BoolExp

Enum BoolExp 

Source
pub enum BoolExp<Identifier> {
Show 21 variants Const(bool), Var(VarRef<Identifier>), Not(Box<BoolExp<Identifier>>), And(Vec<BoolExp<Identifier>>), Or(Vec<BoolExp<Identifier>>), Xor(Vec<BoolExp<Identifier>>), Equiv(Vec<BoolExp<Identifier>>), Implies(Box<BoolExp<Identifier>>, Box<BoolExp<Identifier>>), LessThan(Box<IntExp<Identifier>>, Box<IntExp<Identifier>>), LessThanEq(Box<IntExp<Identifier>>, Box<IntExp<Identifier>>), GreaterThan(Box<IntExp<Identifier>>, Box<IntExp<Identifier>>), GreaterThanEq(Box<IntExp<Identifier>>, Box<IntExp<Identifier>>), NotEqual(Box<Exp<Identifier>>, Box<Exp<Identifier>>), Equal(Vec<Exp<Identifier>>), Member(Box<IntExp<Identifier>>, Box<SetExp<Identifier>>), Disjoint(Box<SetExp<Identifier>>, Box<SetExp<Identifier>>), SubSet(Box<SetExp<Identifier>>, Box<SetExp<Identifier>>), SubSetEq(Box<SetExp<Identifier>>, Box<SetExp<Identifier>>), SuperSet(Box<SetExp<Identifier>>, Box<SetExp<Identifier>>), SuperSetEq(Box<SetExp<Identifier>>, Box<SetExp<Identifier>>), Convex(Box<SetExp<Identifier>>),
}
Expand description

Expression resulting in a Boolean value or decision variable

Variants§

§

Const(bool)

Boolean constant

When serialized Boolean values false and true are represented by integer values 0 and 1.

§

Var(VarRef<Identifier>)

Reference to a variable or array access

§

Not(Box<BoolExp<Identifier>>)

Logical not (i.e., ¬x)

§

And(Vec<BoolExp<Identifier>>)

Logical and (i.e., x1 ∧ …∧ xn)

§

Or(Vec<BoolExp<Identifier>>)

Logical or (i.e., x1 ∨ … ∨ xn)

§

Xor(Vec<BoolExp<Identifier>>)

Logical xor (i.e., x1 ⊕ … ⊕ xn)

§

Equiv(Vec<BoolExp<Identifier>>)

Logical equivalence (i.e., x1 ⇔ … ⇔ xn)

§

Implies(Box<BoolExp<Identifier>>, Box<BoolExp<Identifier>>)

Logical implication (i.e., x ⇒ y)

§

LessThan(Box<IntExp<Identifier>>, Box<IntExp<Identifier>>)

Less than (i.e., x < y)

§

LessThanEq(Box<IntExp<Identifier>>, Box<IntExp<Identifier>>)

Less than or equal (i.e., x ≤ y)

§

GreaterThan(Box<IntExp<Identifier>>, Box<IntExp<Identifier>>)

Greater than (i.e., x > y)

§

GreaterThanEq(Box<IntExp<Identifier>>, Box<IntExp<Identifier>>)

Greater than or equal (i.e., x ≥ y)

§

NotEqual(Box<Exp<Identifier>>, Box<Exp<Identifier>>)

Different From (i.e., x ≠ y)

§

Equal(Vec<Exp<Identifier>>)

Equal to (i.e., x1 = … = xr)

§

Member(Box<IntExp<Identifier>>, Box<SetExp<Identifier>>)

Membership (i.e., x ∈ s)

§

Disjoint(Box<SetExp<Identifier>>, Box<SetExp<Identifier>>)

Disjoint sets (i.e., s ∩ t = ∅)

§

SubSet(Box<SetExp<Identifier>>, Box<SetExp<Identifier>>)

Strict subset (i.e., s ⊂ t)

§

SubSetEq(Box<SetExp<Identifier>>, Box<SetExp<Identifier>>)

Subset or equal to (i.e., s ⊆ t)

§

SuperSet(Box<SetExp<Identifier>>, Box<SetExp<Identifier>>)

Strict superset (i.e., s ⊃ t)

§

SuperSetEq(Box<SetExp<Identifier>>, Box<SetExp<Identifier>>)

Superset or equal to (i.e., s ⊇ t)

§

Convex(Box<SetExp<Identifier>>)

Convexity (i.e., s = {i : min s ≤ i ≤ max s})

Trait Implementations§

Source§

impl<Identifier: Clone> Clone for BoolExp<Identifier>

Source§

fn clone(&self) -> BoolExp<Identifier>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<Identifier: Debug> Debug for BoolExp<Identifier>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de, Identifier: FromStr> Deserialize<'de> for BoolExp<Identifier>

Source§

fn deserialize<D: Deserializer<'de>>( deserializer: D, ) -> Result<BoolExp<Identifier>, D::Error>

Deserialize this value from the given Serde deserializer. Read more
Source§

impl<Identifier: Display> Display for BoolExp<Identifier>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<Identifier: Hash> Hash for BoolExp<Identifier>

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<Identifier: PartialEq> PartialEq for BoolExp<Identifier>

Source§

fn eq(&self, other: &BoolExp<Identifier>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<Identifier: Display> Serialize for BoolExp<Identifier>

Source§

fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error>

Serialize this value into the given Serde serializer. Read more
Source§

impl<Identifier> StructuralPartialEq for BoolExp<Identifier>

Auto Trait Implementations§

§

impl<Identifier> Freeze for BoolExp<Identifier>
where Identifier: Freeze,

§

impl<Identifier> RefUnwindSafe for BoolExp<Identifier>
where Identifier: RefUnwindSafe,

§

impl<Identifier> Send for BoolExp<Identifier>
where Identifier: Send,

§

impl<Identifier> Sync for BoolExp<Identifier>
where Identifier: Sync,

§

impl<Identifier> Unpin for BoolExp<Identifier>
where Identifier: Unpin,

§

impl<Identifier> UnwindSafe for BoolExp<Identifier>
where Identifier: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,