[−][src]Enum exprz_core::ExprRef
Internal Reference to an Expression Type
Variants
Atom(&'e E::Atom)Reference to an atomic expression
Group(<E::Group as IntoIteratorGen<E>>::IterGen)Grouped expression IteratorGen
Implementations
impl<'e, E> ExprRef<'e, E> where
E: Expression, [src]
E: Expression,
#[must_use]pub fn is_atom(&self) -> bool[src]
Check if the ExprRef is atomic.
#[must_use]pub fn is_group(&self) -> bool[src]
Check if the ExprRef is a grouped expression IteratorGen.
#[must_use]pub fn atom(self) -> Option<&'e E::Atom>[src]
Converts from an ExprRef<E> to an Option<&E::Atom>.
#[must_use]pub fn group(self) -> Option<<E::Group as IntoIteratorGen<E>>::IterGen>[src]
Converts from an ExprRef<E> to an Option<E::Group::IterGen>.
pub fn unwrap_atom(self) -> &'e 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 as IntoIteratorGen<E>>::IterGen[src]
Returns the contained Group value, consuming the self value.
Panics
Panics if the self value is an Atom.
pub fn is_subexpression<'r, R>(&self, other: &ExprRef<'r, R>) -> bool where
R: Expression,
E::Atom: PartialEq<R::Atom>, [src]
R: Expression,
E::Atom: PartialEq<R::Atom>,
Check if an Expression is a sub-tree of another Expression using PartialEq on their
Atoms.
Trait Implementations
impl<'e, E> From<ExprRef<'e, E>> for Expr<E> where
E::Atom: Clone,
E::Group: FromIterator<E>,
E: Expression, [src]
E::Atom: Clone,
E::Group: FromIterator<E>,
E: Expression,
impl<'l, 'r, L, R> PartialEq<ExprRef<'r, R>> for ExprRef<'l, 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, E> Send for ExprRef<'e, E> where
<E as Expression>::Atom: Sync,
<<E as Expression>::Group as IntoIteratorGen<E>>::IterGen: Send,
<E as Expression>::Atom: Sync,
<<E as Expression>::Group as IntoIteratorGen<E>>::IterGen: Send,
impl<'e, E> Sync for ExprRef<'e, E> where
<E as Expression>::Atom: Sync,
<<E as Expression>::Group as IntoIteratorGen<E>>::IterGen: Sync,
<E as Expression>::Atom: Sync,
<<E as Expression>::Group as IntoIteratorGen<E>>::IterGen: Sync,
impl<'e, E> Unpin for ExprRef<'e, E> where
<<E as Expression>::Group as IntoIteratorGen<E>>::IterGen: Unpin,
<<E as Expression>::Group as IntoIteratorGen<E>>::IterGen: 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, 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>,