pub enum Primitive {
Number,
String,
Boolean,
BigInt,
Symbol,
Null,
Undefined,
}Expand description
A primitive type the oracle recognizes.
Exactly the set the authoring surface’s TypeInfo.primitive names, and no more. any
and unknown are deliberately absent: they are the absence of a claim, and giving them
a variant would let the oracle assert something TypeScript does not.
Variants§
Number
TypeScript’s number.
String
TypeScript’s string.
Boolean
TypeScript’s boolean.
BigInt
TypeScript’s bigint.
Symbol
TypeScript’s symbol.
Null
TypeScript’s null.
Undefined
TypeScript’s undefined.
Implementations§
Trait Implementations§
impl Copy for Primitive
impl Eq for Primitive
Source§impl Ord for Primitive
impl Ord for Primitive
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 Primitive
impl PartialOrd for Primitive
impl StructuralPartialEq for Primitive
Auto Trait Implementations§
impl Freeze for Primitive
impl RefUnwindSafe for Primitive
impl Send for Primitive
impl Sync for Primitive
impl Unpin for Primitive
impl UnsafeUnpin for Primitive
impl UnwindSafe for Primitive
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