Enum exprz::Expr [−][src]
Canonical Concrete Expression Type
Variants
Atom(E::Atom)Atomic element
Group(E::Group)Grouped expression
Implementations
impl<E> Expr<E> where
E: Expression, [src]
E: Expression,
#[must_use]pub fn is_atom(&self) -> bool[src]
Checks if the Expr is atomic.
#[must_use]pub fn is_group(&self) -> bool[src]
Checks if the Expr is a grouped expression.
#[must_use]pub fn atom(self) -> Option<E::Atom>[src]
Converts from an Expr<E> to an Option<E::Atom>.
#[must_use]pub fn atom_ref(&self) -> Option<&E::Atom>[src]
Converts from an &Expr<E> to an Option<&E::Atom>.
#[must_use]pub fn group(self) -> Option<E::Group>[src]
Converts from an Expr<E> to an Option<E::Group>.
#[must_use]pub fn group_ref(&self) -> Option<&E::Group>[src]
Converts from an &Expr<E> to an Option<&E::Group>.
pub fn unwrap_atom(self) -> E::Atom[src]
Returns the contained Atom value, consuming the self value.
Panics
Panics if the self value is a Group.
pub fn unwrap_group(self) -> E::Group[src]
Returns the contained Group value, consuming the self value.
Panics
Panics if the self value is an Atom.
pub fn map<O, F>(self, f: F) -> O where
E::Group: IntoIterator<Item = E>,
O: Expression,
O::Group: FromIterator<O>,
F: FnMut(E::Atom) -> O::Atom, [src]
E::Group: IntoIterator<Item = E>,
O: Expression,
O::Group: FromIterator<O>,
F: FnMut(E::Atom) -> O::Atom,
Extends a function on Atoms to a function on Expressions.
pub fn substitute<F>(self, f: F) -> E where
E::Group: FromIterator<E> + IntoIterator<Item = E>,
F: FnMut(E::Atom) -> E, [src]
E::Group: FromIterator<E> + IntoIterator<Item = E>,
F: FnMut(E::Atom) -> E,
Substitutes an Expression into each Atom of self.
Trait Implementations
impl<E> Clone for Expr<E> where
E: Expression,
E::Atom: Clone,
E::Group: FromIterator<E>, [src]
E: Expression,
E::Atom: Clone,
E::Group: FromIterator<E>,
fn clone(&self) -> Self[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl<E: Debug> Debug for Expr<E> where
E: Expression,
E::Atom: Debug,
E::Group: Debug, [src]
E: Expression,
E::Atom: Debug,
E::Group: Debug,
impl<E> Default for Expr<E> where
E: Expression,
E::Group: FromIterator<E>, [src]
E: Expression,
E::Group: FromIterator<E>,
impl<E> Eq for Expr<E> where
E: Expression,
E::Atom: PartialEq, [src]
E: Expression,
E::Atom: PartialEq,
impl<'e, E> From<&'e Expr<E>> for ExprRef<'e, E> where
E: Expression, [src]
E: Expression,
impl<A> From<Expr<A>> for Expr<Expr<A>>[src]
alloc only.impl<T> From<Expr<T, usize, usize>> for Expr<Expr<T>>[src]
buffered only.impl<'e, E> From<ExprRef<'e, E>> for Expr<E> where
E: Expression,
E::Atom: Clone,
E::Group: FromIterator<E>, [src]
E: Expression,
E::Atom: Clone,
E::Group: FromIterator<E>,
impl<A, G> From<MultiExpr<A, G>> for Expr<MultiExpr<A, G>>[src]
multi and alloc only.impl<E> FromStr for Expr<E> where
E: Expression,
E::Atom: FromIterator<char>,
E::Group: FromIterator<E>, [src]
E: Expression,
E::Atom: FromIterator<char>,
E::Group: FromIterator<E>,
parse only.type Err = Error
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Self, Self::Err>[src]
impl<L, R> PartialEq<Expr<R>> for Expr<L> where
L: Expression,
R: Expression,
L::Atom: PartialEq<R::Atom>, [src]
L: Expression,
R: Expression,
L::Atom: PartialEq<R::Atom>,
Auto Trait Implementations
impl<E> Send for Expr<E> where
<E as Expression>::Atom: Send,
<E as Expression>::Group: Send,
<E as Expression>::Atom: Send,
<E as Expression>::Group: Send,
impl<E> Sync for Expr<E> where
<E as Expression>::Atom: Sync,
<E as Expression>::Group: Sync,
<E as Expression>::Atom: Sync,
<E as Expression>::Group: Sync,
impl<E> Unpin for Expr<E> where
<E as Expression>::Atom: Unpin,
<E as Expression>::Group: Unpin,
<E as Expression>::Atom: Unpin,
<E as Expression>::Group: Unpin,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,