Trait exprz::Reference[][src]

pub trait Reference<'e, E>: From<&'e E> where
    E: 'e + Expression
{ fn cases(self) -> ExprRef<'e, E>; #[must_use] fn is_atom(self) -> bool
    where
        Self: Sized
, { ... }
#[must_use] fn is_group(self) -> bool
    where
        Self: Sized
, { ... }
#[must_use] fn atom(self) -> Option<&'e E::Atom>
    where
        Self: Sized
, { ... }
#[must_use] fn group(self) -> Option<GroupRef<'e, E>>
    where
        Self: Sized
, { ... }
fn to_owned(self) -> E
    where
        Self: Sized,
        E::Atom: Clone,
        E::Group: FromIterator<E>
, { ... }
fn substitute_ref<F>(self, f: F) -> E
    where
        E::Group: FromIterator<E>,
        F: FnMut(&E::Atom) -> E
, { ... } }

Expression Reference Trait

Required methods

fn cases(self) -> ExprRef<'e, E>[src]

Returns the inner expression reference.

Loading content...

Provided methods

#[must_use]fn is_atom(self) -> bool where
    Self: Sized
[src]

Checks if the Reference is an atomic expression &E::Atom.

#[must_use]fn is_group(self) -> bool where
    Self: Sized
[src]

Checks if the Reference is a grouped expression Group<E>::Ref.

#[must_use]fn atom(self) -> Option<&'e E::Atom> where
    Self: Sized
[src]

Converts from a Reference<E> to an Option<&E::Atom>.

#[must_use]fn group(self) -> Option<GroupRef<'e, E>> where
    Self: Sized
[src]

Converts from a Reference<E> to an Option<GroupRef<E>>.

fn to_owned(self) -> E where
    Self: Sized,
    E::Atom: Clone,
    E::Group: FromIterator<E>, 
[src]

Returns new owned copy of the underlying Expression.

fn substitute_ref<F>(self, f: F) -> E where
    E::Group: FromIterator<E>,
    F: FnMut(&E::Atom) -> E, 
[src]

Performs substitution over the Expression by reference.

Loading content...

Implementations on Foreign Types

impl<'e, E> Reference<'e, E> for &'e E where
    E: Expression
[src]

Loading content...

Implementors

impl<'e, E> Reference<'e, E> for ExprRef<'e, E> where
    E: Expression
[src]

impl<'e, T> Reference<'e, Expr<T, usize, usize>> for ExprView<'e, T>[src]

This is supported on crate feature buffered only.
Loading content...