Enum liberty_db::expression::Expr
source · pub enum Expr {
Const(bool),
Variable(String),
Not(Box<BooleanExpression>),
And(Box<BooleanExpression>, Box<BooleanExpression>),
Or(Box<BooleanExpression>, Box<BooleanExpression>),
Xor(Box<BooleanExpression>, Box<BooleanExpression>),
Imp(Box<BooleanExpression>, Box<BooleanExpression>),
Iff(Box<BooleanExpression>, Box<BooleanExpression>),
Cond(Box<BooleanExpression>, Box<BooleanExpression>, Box<BooleanExpression>),
}
Expand description
Recursive type for boolean expression tree.
Variants§
Const(bool)
Variable(String)
Not(Box<BooleanExpression>)
And(Box<BooleanExpression>, Box<BooleanExpression>)
Or(Box<BooleanExpression>, Box<BooleanExpression>)
Xor(Box<BooleanExpression>, Box<BooleanExpression>)
Imp(Box<BooleanExpression>, Box<BooleanExpression>)
Iff(Box<BooleanExpression>, Box<BooleanExpression>)
Cond(Box<BooleanExpression>, Box<BooleanExpression>, Box<BooleanExpression>)
cond ? then_expr : else_expr
Trait Implementations§
source§impl BooleanExpressionLike for Expr
impl BooleanExpressionLike for Expr
source§impl Borrow<BooleanExpression> for BooleanExpression
impl Borrow<BooleanExpression> for BooleanExpression
source§impl Clone for BooleanExpression
impl Clone for BooleanExpression
source§fn clone(&self) -> BooleanExpression
fn clone(&self) -> BooleanExpression
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for BooleanExpression
impl Debug for BooleanExpression
source§impl<'de> Deserialize<'de> for BooleanExpression
impl<'de> Deserialize<'de> for BooleanExpression
source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<BooleanExpression, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<BooleanExpression, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Display for BooleanExpression
impl Display for BooleanExpression
source§impl From<BooleanExpression> for BooleanExpression
impl From<BooleanExpression> for BooleanExpression
source§impl From<BooleanExpression> for Expr
impl From<BooleanExpression> for Expr
source§fn from(val: BooleanExpression) -> Self
fn from(val: BooleanExpression) -> Self
Converts to this type from the input type.
source§impl From<BooleanExpression> for IdBooleanExpression
impl From<BooleanExpression> for IdBooleanExpression
source§impl From<IdBooleanExpression> for Expr
impl From<IdBooleanExpression> for Expr
source§fn from(val: IdBooleanExpression) -> Self
fn from(val: IdBooleanExpression) -> Self
Converts to this type from the input type.
source§impl PartialEq for BooleanExpression
impl PartialEq for BooleanExpression
source§impl Serialize for BooleanExpression
impl Serialize for BooleanExpression
source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
source§impl TryFrom<&str> for BooleanExpression
impl TryFrom<&str> for BooleanExpression
impl Eq for BooleanExpression
impl StructuralPartialEq for BooleanExpression
Auto Trait Implementations§
impl Freeze for BooleanExpression
impl RefUnwindSafe for BooleanExpression
impl Send for BooleanExpression
impl Sync for BooleanExpression
impl Unpin for BooleanExpression
impl UnwindSafe for BooleanExpression
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more