Enum logic::expr::Expr
[−]
[src]
pub enum Expr<T> { Truth(bool), Proposition(Rc<T>), Not(Box<Expr<T>>), And(Box<Expr<T>>, Box<Expr<T>>), Or(Box<Expr<T>>, Box<Expr<T>>), Xor(Box<Expr<T>>, Box<Expr<T>>), Implies(Box<Expr<T>>, Box<Expr<T>>), Equivalent(Box<Expr<T>>, Box<Expr<T>>), }
Variants
Truth(bool)
Proposition(Rc<T>)
Not(Box<Expr<T>>)
And(Box<Expr<T>>, Box<Expr<T>>)
Or(Box<Expr<T>>, Box<Expr<T>>)
Xor(Box<Expr<T>>, Box<Expr<T>>)
Implies(Box<Expr<T>>, Box<Expr<T>>)
Equivalent(Box<Expr<T>>, Box<Expr<T>>)
Methods
impl<T> Expr<T>
[src]
pub fn truth(t: bool) -> Self
[src]
pub fn proposition(p: T) -> Self
[src]
pub fn has_same_operation(&self, e: &Expr<T>) -> bool
[src]
Trait Implementations
impl<T: Debug> Debug for Expr<T>
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<T: Eq> Eq for Expr<T>
[src]
impl<T: PartialEq> PartialEq for Expr<T>
[src]
fn eq(&self, __arg_0: &Expr<T>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Expr<T>) -> bool
[src]
This method tests for !=
.
impl<T: Hash> Hash for Expr<T>
[src]
fn hash<__HT: Hasher>(&self, __arg_0: &mut __HT)
[src]
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl<T> Clone for Expr<T>
[src]
fn clone(&self) -> Self
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<T> Display for Expr<T> where
T: Display,
[src]
T: Display,
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<T> Not for Expr<T>
[src]
type Output = Expr<T>
The resulting type after applying the !
operator.
fn not(self) -> Self::Output
[src]
Performs the unary !
operation.
impl<RHS, T> BitAnd<RHS> for Expr<T> where
RHS: Into<Expr<T>>,
[src]
RHS: Into<Expr<T>>,
type Output = Expr<T>
The resulting type after applying the &
operator.
fn bitand(self, e: RHS) -> Self::Output
[src]
Performs the &
operation.
impl<RHS, T> BitOr<RHS> for Expr<T> where
RHS: Into<Expr<T>>,
[src]
RHS: Into<Expr<T>>,
type Output = Expr<T>
The resulting type after applying the |
operator.
fn bitor(self, e: RHS) -> Self::Output
[src]
Performs the |
operation.
impl<RHS, T> BitXor<RHS> for Expr<T> where
RHS: Into<Expr<T>>,
[src]
RHS: Into<Expr<T>>,