pub struct TypeFacts(pub u16);Expand description
Bitmask over narrowing predicates, modeled on TypeScript’s TypeFacts.
Tuple Fields§
§0: u16Implementations§
Source§impl TypeFacts
impl TypeFacts
pub const EMPTY: Self
pub const TRUTHY: Self
pub const FALSY: Self
pub const EQ_NULL: Self
pub const NE_NULL: Self
pub const IS_NUMBER: Self
pub const IS_STRING: Self
pub const IS_BOOLEAN: Self
pub const IS_OBJECT: Self
pub const IS_FUNCTION: Self
pub const IS_ARRAY: Self
pub const EQ_UNDEFINED: Self
pub const NE_UNDEFINED: Self
pub const IS_BIGINT: Self
pub const IS_UNDEFINED: Self
pub fn contains(self, other: Self) -> bool
pub fn is_empty(self) -> bool
Trait Implementations§
Source§impl BitOrAssign for TypeFacts
impl BitOrAssign for TypeFacts
Source§fn bitor_assign(&mut self, rhs: Self)
fn bitor_assign(&mut self, rhs: Self)
Performs the
|= operation. Read moreimpl Copy for TypeFacts
impl Eq for TypeFacts
Source§impl Ord for TypeFacts
impl Ord for TypeFacts
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for TypeFacts
impl PartialOrd for TypeFacts
impl StructuralPartialEq for TypeFacts
Auto Trait Implementations§
impl Freeze for TypeFacts
impl RefUnwindSafe for TypeFacts
impl Send for TypeFacts
impl Sync for TypeFacts
impl Unpin for TypeFacts
impl UnsafeUnpin for TypeFacts
impl UnwindSafe for TypeFacts
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> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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.