pub enum Truthiness {
True,
False,
Falsey,
Truthy,
None,
Unknown,
}Variants§
True
The expression is True.
False
The expression is False.
Falsey
The expression evaluates to a False-like value (e.g., None, 0, [], "").
Truthy
The expression evaluates to a True-like value (e.g., 1, "foo").
None
The expression evaluates to None.
Unknown
The expression evaluates to an unknown value (e.g., a variable x of unknown type).
Implementations§
Source§impl Truthiness
impl Truthiness
Sourcepub const fn is_unknown(&self) -> bool
pub const fn is_unknown(&self) -> bool
Returns true if self is of variant Unknown.
Trait Implementations§
Source§impl Clone for Truthiness
impl Clone for Truthiness
Source§fn clone(&self) -> Truthiness
fn clone(&self) -> Truthiness
Returns a duplicate 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 Truthiness
impl Debug for Truthiness
Source§impl PartialEq for Truthiness
impl PartialEq for Truthiness
impl Copy for Truthiness
impl StructuralPartialEq for Truthiness
Auto Trait Implementations§
impl Freeze for Truthiness
impl RefUnwindSafe for Truthiness
impl Send for Truthiness
impl Sync for Truthiness
impl Unpin for Truthiness
impl UnsafeUnpin for Truthiness
impl UnwindSafe for Truthiness
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