[][src]Struct serde_lexpr::parse::Options

pub struct Options { /* fields omitted */ }

Various options to influence parser behavior.

Methods

impl Options[src]

pub fn new() -> Options[src]

Construct an empty set of options.

This will recognize no keywords, and parse nil and t as regular symbols.

pub fn elisp() -> Options[src]

Construct a set of options suitable for parsing Emacs Lisp.

pub fn with_keyword_syntax(self, syntax: KeywordSyntax) -> Options[src]

Add syntax to the recognized keyword syntaxes.

pub fn with_keyword_syntaxes<I, T>(self, styles: I) -> Options where
    I: IntoIterator<Item = T>,
    T: Borrow<KeywordSyntax>, 
[src]

Set the recognized keyword syntaxes.

pub fn with_nil_symbol(self, treatment: NilSymbol) -> Options[src]

Choose how to parse the nil symbol.

pub fn with_t_symbol(self, treatment: TSymbol) -> Options[src]

Choose how to parse the t symbol.

pub fn with_brackets(self, treatment: Brackets) -> Options[src]

Choose how to handle brackets.

pub fn with_string_syntax(self, syntax: StringSyntax) -> Options[src]

Choose the accepted string syntax.

pub fn with_char_syntax(self, syntax: CharSyntax) -> Options[src]

Choose the accepted character syntax.

pub fn keyword_syntax(self, syntax: KeywordSyntax) -> bool[src]

Check wether a keyword syntax is enabled.

pub fn nil_symbol(self) -> NilSymbol[src]

Query the way the nil symbol is handled.

pub fn t_symbol(self) -> TSymbol[src]

Query the way the t symbol is handled.

pub fn brackets(self) -> Brackets[src]

Query the way brackets are handled.

pub fn string_syntax(self) -> StringSyntax[src]

Query the accepted string syntax.

pub fn char_syntax(self) -> CharSyntax[src]

Query the accepted character syntax.

Trait Implementations

impl Clone for Options[src]

impl Copy for Options[src]

impl Debug for Options[src]

impl Default for Options[src]

fn default() -> Options[src]

Construct a default set of options. This corresponds most closely to the Scheme dialect of S-expressions:

  • The identifiers nil and t are treated as regular symbols.
  • Only octothorpe keywords are recognized.
  • Brackets are treated just like parentheses, i.e. indicating a list.

Auto Trait Implementations

impl RefUnwindSafe for Options

impl Send for Options

impl Sync for Options

impl Unpin for Options

impl UnwindSafe for Options

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.