[][src]Struct proteus::Parser

pub struct Parser {}

This type represents a set of static methods for parsing transformation syntax into Action's.

The parser is responsible for parsing the transformation action specific syntax, take the following source syntax: join(" ", const("Mr."), first_name, last_name) the parser knows how to breakdown the syntax into a join action which calls the const action, and 2 getter actions and joins those actions results.

Actions currently supported include:

  • const eg. const(<value>)
  • join eg. `join(<separator, )

Implementations

impl Parser[src]

pub fn parse(source: &str, destination: &str) -> Result<Box<dyn Action>, Error>[src]

parses a single transformation action to be taken with the provided source & destination.

pub fn parse_multi(
    parsables: &[Parsable]
) -> Result<Vec<Box<dyn Action>>, Error>
[src]

parses a set of transformation actions into Action's.

pub fn parse_multi_from_str(s: &str) -> Result<Vec<Box<dyn Action>>, Error>[src]

parses a set of transformation actions into Action's from a JSON string of serialized Parsable structs.

Auto Trait Implementations

impl RefUnwindSafe for Parser

impl Send for Parser

impl Sync for Parser

impl Unpin for Parser

impl UnwindSafe for Parser

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, 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.