pub enum TruthinessClass {
AlwaysTruthy,
AlwaysFalsy,
NumberLike,
StringLike,
BooleanLike,
BigIntLike,
Dynamic,
}Expand description
JS-truthiness classification of a single (non-union) type: which runtime test decides truthiness for values of that member.
Variants§
AlwaysTruthy
AlwaysFalsy
NumberLike
Falsy iff 0, -0, or NaN. Includes number enums (may hold 0).
StringLike
Falsy iff "". Includes string enums (may hold "").
BooleanLike
Falsy iff false.
BigIntLike
Falsy iff 0n.
Dynamic
Erased at compile time — needs the full runtime dispatch.
Trait Implementations§
Source§impl Clone for TruthinessClass
impl Clone for TruthinessClass
impl Copy for TruthinessClass
Source§impl Debug for TruthinessClass
impl Debug for TruthinessClass
impl Eq for TruthinessClass
Source§impl PartialEq for TruthinessClass
impl PartialEq for TruthinessClass
impl StructuralPartialEq for TruthinessClass
Auto Trait Implementations§
impl Freeze for TruthinessClass
impl RefUnwindSafe for TruthinessClass
impl Send for TruthinessClass
impl Sync for TruthinessClass
impl Unpin for TruthinessClass
impl UnsafeUnpin for TruthinessClass
impl UnwindSafe for TruthinessClass
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.