Enum evaltrees::ast::Pattern[][src]

pub enum Pattern<Aux> {
    Binding(Symbol, Aux),
    Cons(Box<Pattern<Aux>>, Box<Pattern<Aux>>, Aux),
    Literal(Literal, Aux),
}

A pattern.

Variants

A name.

A cons.

A literal value.

Methods

impl<Aux> Pattern<Aux>
[src]

Gets the auxiliary data as a reference.

Returns the bound variables of a pattern.

Modifies the aux value, recursively.

impl<Aux: Clone> Pattern<Aux>
[src]

Returns the bindings from the match between the pattern and the expression, if possible. Returns None if the pattern and expression do not unify. Will probably return None if the expression is not in normal form.

impl<Aux: Clone> Pattern<Aux>
[src]

Clones the auxiliary data out.

Trait Implementations

impl<Aux> Display for Pattern<Aux>
[src]

Formats the value using the given formatter. Read more

impl<Aux: Clone> Clone for Pattern<Aux>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<Aux: Debug> Debug for Pattern<Aux>
[src]

Formats the value using the given formatter. Read more

impl<Aux: PartialEq> PartialEq for Pattern<Aux>
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

impl<Aux> Send for Pattern<Aux> where
    Aux: Send

impl<Aux> Sync for Pattern<Aux> where
    Aux: Sync