#[repr(u8)]pub enum TernaryVal {
True = 0,
False = 1,
DontCare = 2,
}Expand description
Ternary value assigned to a literal or variable, including possible “don’t care”
Variants§
True = 0
Positive assignment.
False = 1
Negative assignment.
DontCare = 2
Formula is satisfied, no matter the assignment.
Implementations§
Source§impl TernaryVal
impl TernaryVal
Sourcepub fn to_bool_with_def(self, def: bool) -> bool
pub fn to_bool_with_def(self, def: bool) -> bool
Converts a TernaryVal to a bool with a default value for “don’t cares”
Trait Implementations§
Source§impl Clone for TernaryVal
impl Clone for TernaryVal
Source§fn clone(&self) -> TernaryVal
fn clone(&self) -> TernaryVal
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 TernaryVal
Ternary values can be printed with the Debug trait
impl Debug for TernaryVal
Ternary values can be printed with the Debug trait
Source§impl Default for TernaryVal
impl Default for TernaryVal
Source§fn default() -> TernaryVal
fn default() -> TernaryVal
Returns the “default value” for a type. Read more
Source§impl Display for TernaryVal
Ternary values can be printed with the Display trait
impl Display for TernaryVal
Ternary values can be printed with the Display trait
Source§impl From<bool> for TernaryVal
impl From<bool> for TernaryVal
Source§impl FromIterator<TernaryVal> for Assignment
impl FromIterator<TernaryVal> for Assignment
Source§fn from_iter<T: IntoIterator<Item = TernaryVal>>(iter: T) -> Self
fn from_iter<T: IntoIterator<Item = TernaryVal>>(iter: T) -> Self
Creates a value from an iterator. Read more
Source§impl Neg for TernaryVal
impl Neg for TernaryVal
Source§impl Not for TernaryVal
impl Not for TernaryVal
Source§impl PartialEq for TernaryVal
impl PartialEq for TernaryVal
impl Copy for TernaryVal
impl Eq for TernaryVal
impl StructuralPartialEq for TernaryVal
Auto Trait Implementations§
impl Freeze for TernaryVal
impl RefUnwindSafe for TernaryVal
impl Send for TernaryVal
impl Sync for TernaryVal
impl Unpin for TernaryVal
impl UnwindSafe for TernaryVal
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