#[repr(transparent)]pub struct Value(pub u64);Tuple Fields§
§0: u64Implementations§
Source§impl Value
impl Value
pub const NIL: Value
pub const FALSE: Value
pub const TRUE: Value
Sourcepub const EMPTY: Value
pub const EMPTY: Value
Marks an empty slot in internal tables and an uninitialized register. Never user-visible.
pub fn from_f64(f: f64) -> Value
pub fn bool(b: bool) -> Value
Sourcepub fn small_int(i: i64) -> Value
pub fn small_int(i: i64) -> Value
Encodes a small integer. The caller guarantees i fits in 48 bits.
pub fn from_ptr(p: *const Header) -> Value
pub fn is_float(self) -> bool
pub fn is_small_int(self) -> bool
pub fn is_ptr(self) -> bool
pub fn is_nil(self) -> bool
pub fn is_bool(self) -> bool
pub fn is_true(self) -> bool
pub fn is_empty_marker(self) -> bool
pub fn as_f64(self) -> f64
pub fn as_small_int(self) -> i64
pub fn as_ptr(self) -> *mut Header
Sourcepub fn both_small_ints(a: Value, b: Value) -> bool
pub fn both_small_ints(a: Value, b: Value) -> bool
Both operands are small integers (one check for binary fast paths).
Trait Implementations§
impl Copy for Value
impl Eq for Value
impl StructuralPartialEq for Value
Auto Trait Implementations§
impl Freeze for Value
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnsafeUnpin for Value
impl UnwindSafe for Value
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