[][src]Trait sexpy::Sexpy

pub trait Sexpy {
    fn sexp_parse<'a>(
        input: &'a str
    ) -> IResult<&'a str, Self, SexpyError<&'a str>>
    where
        Self: Sized
; fn parse(input: &str) -> Result<Self, String>
    where
        Self: Sized
, { ... }
fn parse_verbose(input: &str) -> Result<Self, String>
    where
        Self: Sized
, { ... } }

The trait that is automatically derived from a type definition. You should not need to implement this manually unless you are writing a parser for some primitive type. Parsers for several common primitive types have already been defined

Required methods

fn sexp_parse<'a>(input: &'a str) -> IResult<&'a str, Self, SexpyError<&'a str>> where
    Self: Sized

The parser for this trait. Should be automatically derivable from a type definition in most cases

Loading content...

Provided methods

fn parse(input: &str) -> Result<Self, String> where
    Self: Sized

Takes a string and tries calling the parser for this trait on it, converting any errors into a string using SexpyError::convert_error

fn parse_verbose(input: &str) -> Result<Self, String> where
    Self: Sized

Takes a string and tries calling the parser for this trait on it, converting any errors into a string using SexpyError::convert_error_verbose

Loading content...

Implementations on Foreign Types

impl Sexpy for String[src]

Parses a 'word', which is anything that starts with an upper or lowercase ASCII character (a-z, A-Z) and ends in a space or one of the following characters: ()[]{}\;

impl Sexpy for u64[src]

Parses unsigned 64 bit integers

impl Sexpy for u32[src]

Parses unsigned 32 bit integers

impl Sexpy for i64[src]

Parses signed 64 bit integers

impl Sexpy for i32[src]

Parses signed 32 bit integers

impl<T: Sexpy> Sexpy for Option<T>[src]

Optionally parses T

impl<T: Sexpy> Sexpy for Vec<T>[src]

Parses 0 or more instances of T seperated by whitespace

impl<T: Sexpy> Sexpy for Box<T>[src]

Just parses T but puts the result in a Box<T>

impl<T: Sexpy> Sexpy for Rc<T>[src]

Just parses T but puts the result in an Rc<T>

Loading content...

Implementors

Loading content...