pub enum Bool {
Const(bool),
Lit(Lit),
}
Expand description
Boolean value, either a constant (Bool::Const
) or
a literal (Bool::Lit
). Create values by creating new
variables (Solver::new_lit()
) or from a constant boolean (true.into()
).
Variants§
Trait Implementations§
Source§impl ModelOrd for Bool
impl ModelOrd for Bool
fn assert_less_tuple_or<B: ModelOrd>( solver: &mut Solver, prefix: Vec<Bool>, inclusive: bool, (x, p): (&Bool, &B), (y, q): (&Bool, &B), )
fn new_less_lit( solver: &mut Solver, inclusive: bool, a: &Bool, b: &Bool, ) -> Bool
fn assert_less_or( solver: &mut Solver, prefix: Vec<Bool>, inclusive: bool, a: &Self, b: &Self, )
Source§impl<'a> ModelValue<'a> for Bool
impl<'a> ModelValue<'a> for Bool
impl Copy for Bool
impl Eq for Bool
impl StructuralPartialEq for Bool
Auto Trait Implementations§
impl Freeze for Bool
impl RefUnwindSafe for Bool
impl !Send for Bool
impl !Sync for Bool
impl Unpin for Bool
impl UnwindSafe for Bool
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§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