[−][src]Enum exprz::Expr
Canonical Concrete Expression
Type
Variants
Atom(<E as Expression>::Atom)
Atomic element
Group(<E as Expression>::Group)
Grouped expression
Implementations
impl<E> Expr<E> where
E: Expression,
[src]
E: Expression,
#[must_use]pub fn is_atom(&self) -> bool
[src]
Check if the Expr
is atomic.
#[must_use]pub fn is_group(&self) -> bool
[src]
Check if the Expr
is a grouped expression.
#[must_use]pub fn atom(self) -> Option<<E as Expression>::Atom>
[src]
Converts from an Expr<E>
to an Option<E::Atom>
.
#[must_use]pub fn group(self) -> Option<<E as Expression>::Group>
[src]
Converts from an Expr<E>
to an Option<E::Group>
.
pub fn unwrap_atom(self) -> <E as Expression>::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 as Expression>::Group
[src]
Returns the contained Group
value, consuming the self
value.
Panics
Panics if the self
value is an Atom
.
Trait Implementations
impl<E> Clone for Expr<E> where
E: Clone + Expression,
<E as Expression>::Atom: Clone,
<E as Expression>::Group: Clone,
[src]
E: Clone + Expression,
<E as Expression>::Atom: Clone,
<E as Expression>::Group: Clone,
impl<E> Copy for Expr<E> where
E: Copy + Expression,
<E as Expression>::Atom: Copy,
<E as Expression>::Group: Copy,
[src]
E: Copy + Expression,
<E as Expression>::Atom: Copy,
<E as Expression>::Group: Copy,
impl<E> Debug for Expr<E> where
E: Debug + Expression,
<E as Expression>::Atom: Debug,
<E as Expression>::Group: Debug,
[src]
E: Debug + Expression,
<E as Expression>::Atom: Debug,
<E as Expression>::Group: Debug,
impl<E> Default for Expr<E> where
E: Expression,
<E as Expression>::Group: FromIterator<E>,
[src]
E: Expression,
<E as Expression>::Group: FromIterator<E>,
impl<E> Eq for Expr<E> where
E: Eq + Expression,
<E as Expression>::Atom: Eq,
<E as Expression>::Group: Eq,
[src]
E: Eq + Expression,
<E as Expression>::Atom: Eq,
<E as Expression>::Group: Eq,
impl<E> From<E> for Expr<E> where
E: Expression,
[src]
E: Expression,
impl<'e, E> From<ExprRef<'e, E>> for Expr<E> where
E: Expression,
<E as Expression>::Atom: Clone,
<E as Expression>::Group: FromIterator<E>,
[src]
E: Expression,
<E as Expression>::Atom: Clone,
<E as Expression>::Group: FromIterator<E>,
impl<E> Hash for Expr<E> where
E: Hash + Expression,
<E as Expression>::Atom: Hash,
<E as Expression>::Group: Hash,
[src]
E: Hash + Expression,
<E as Expression>::Atom: Hash,
<E as Expression>::Group: Hash,
pub fn hash<__H>(&self, state: &mut __H) where
__H: Hasher,
[src]
__H: Hasher,
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<E> Ord for Expr<E> where
E: Ord + Expression,
<E as Expression>::Atom: Ord,
<E as Expression>::Group: Ord,
[src]
E: Ord + Expression,
<E as Expression>::Atom: Ord,
<E as Expression>::Group: Ord,
pub fn cmp(&self, other: &Expr<E>) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl<E> PartialEq<Expr<E>> for Expr<E> where
E: PartialEq<E> + Expression,
<E as Expression>::Atom: PartialEq<<E as Expression>::Atom>,
<E as Expression>::Group: PartialEq<<E as Expression>::Group>,
[src]
E: PartialEq<E> + Expression,
<E as Expression>::Atom: PartialEq<<E as Expression>::Atom>,
<E as Expression>::Group: PartialEq<<E as Expression>::Group>,
impl<E> PartialOrd<Expr<E>> for Expr<E> where
E: PartialOrd<E> + Expression,
<E as Expression>::Atom: PartialOrd<<E as Expression>::Atom>,
<E as Expression>::Group: PartialOrd<<E as Expression>::Group>,
[src]
E: PartialOrd<E> + Expression,
<E as Expression>::Atom: PartialOrd<<E as Expression>::Atom>,
<E as Expression>::Group: PartialOrd<<E as Expression>::Group>,
pub fn partial_cmp(&self, other: &Expr<E>) -> Option<Ordering>
[src]
pub fn lt(&self, other: &Expr<E>) -> bool
[src]
pub fn le(&self, other: &Expr<E>) -> bool
[src]
pub fn gt(&self, other: &Expr<E>) -> bool
[src]
pub fn ge(&self, other: &Expr<E>) -> bool
[src]
impl<E> StructuralEq for Expr<E> where
E: Expression,
[src]
E: Expression,
impl<E> StructuralPartialEq for Expr<E> where
E: Expression,
[src]
E: Expression,
Auto Trait Implementations
impl<E> RefUnwindSafe for Expr<E> where
<E as Expression>::Atom: RefUnwindSafe,
<E as Expression>::Group: RefUnwindSafe,
<E as Expression>::Atom: RefUnwindSafe,
<E as Expression>::Group: RefUnwindSafe,
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,
impl<E> UnwindSafe for Expr<E> where
<E as Expression>::Atom: UnwindSafe,
<E as Expression>::Group: UnwindSafe,
<E as Expression>::Atom: UnwindSafe,
<E as Expression>::Group: UnwindSafe,
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<!> for 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>,