Struct proteus::Parser[][src]

pub struct Parser {}
Expand description

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

add_action_parser adds an Action parsing function to dynamically be parsed. NOTE: this WILL overwrite any pre-existing functions with the same name.

name only accepts ASCII letters, numbers and _ equivalent to [a-zA-Z0-9_].

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

parses a set of transformation actions into Action’s.

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

parses an Action given the provided str. This is primarily used as a helper in custom Action Parsers.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.