pub enum Kind {
Null,
Bool,
Int,
Float,
String,
Array,
Object,
UnsafeInteger,
IntegerTooWide,
Foreign,
}Expand description
What a value is, before asking what it holds.
Variants§
Null
Bool
Int
Float
String
Array
Object
UnsafeInteger
An integer the host’s own numeric type cannot represent exactly.
A JavaScript number above 2^53 is already wrong by the time Seam sees
it. Nothing here can recover the value, so the only honest answer is to
say so rather than validate a number that is quietly not the one sent.
IntegerTooWide
A real integer, but wider than 64 bits, so the model cannot hold it.
Its own kind rather than Foreign because truncating here is the exact
bug Seam exists to prevent, and the caller deserves to be told which of
the two happened.
Foreign
Something the model has no place for. A binding reports it rather than guessing.
Implementations§
Trait Implementations§
impl Copy for Kind
impl Eq for Kind
impl StructuralPartialEq for Kind
Auto Trait Implementations§
impl Freeze for Kind
impl RefUnwindSafe for Kind
impl Send for Kind
impl Sync for Kind
impl Unpin for Kind
impl UnsafeUnpin for Kind
impl UnwindSafe for Kind
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