Trait exprz::shape::Shape[][src]

pub trait Shape<E> where
    E: Expression,
    Self: Into<Expr<E>> + Matcher<E> + TryFrom<Expr<E>, Error = Self::Error>, 
{ fn parse_atom(atom: E::Atom) -> Result<Self, Self::Error> { ... }
fn parse_group(group: E::Group) -> Result<Self, Self::Error> { ... }
fn parse_expr(expr: E) -> Result<Self, Self::Error> { ... } }
This is supported on crate feature shape only.

Shape Trait

Contract

The following should hold for all expr: E:

matches(&expr).err() == expr.try_into().err()

but can be weakend to the following,

matches(&expr).is_err() == expr.try_into().is_err()

if it is impossible or inefficient to implement the stronger contract.

Provided methods

fn parse_atom(atom: E::Atom) -> Result<Self, Self::Error>[src]

Parses an Expression::Atom into Self.

fn parse_group(group: E::Group) -> Result<Self, Self::Error>[src]

Parses an Expression::Group into Self.

fn parse_expr(expr: E) -> Result<Self, Self::Error>[src]

Parses an Expression into Self.

Loading content...

Implementors

Loading content...