pub enum VarState {
Unassigned,
Assigned(bool),
}Expand description
Represents the assignment state of a propositional variable.
A variable can be unassigned, or assigned to true or false.
Variants§
Unassigned
The variable has not been assigned a truth value.
Assigned(bool)
The variable has been assigned a specific truth value.
Implementations§
Source§impl VarState
impl VarState
Sourcepub const fn is_assigned(self) -> bool
pub const fn is_assigned(self) -> bool
Checks if the variable state is Assigned.
§Returns
true if the variable is assigned (either true or false), false otherwise.
Sourcepub const fn is_unassigned(self) -> bool
pub const fn is_unassigned(self) -> bool
Checks if the variable state is Unassigned.
§Returns
true if the variable is unassigned, false otherwise.
Trait Implementations§
Source§impl Ord for VarState
impl Ord for VarState
Source§impl PartialOrd for VarState
impl PartialOrd for VarState
impl Copy for VarState
impl Eq for VarState
impl StructuralPartialEq for VarState
Auto Trait Implementations§
impl Freeze for VarState
impl RefUnwindSafe for VarState
impl Send for VarState
impl Sync for VarState
impl Unpin for VarState
impl UnwindSafe for VarState
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