pub enum Number {
I64(i64),
U64(u64),
F64(f64),
Big(Box<BigInt>),
}Expand description
A BEVE number, which can be signed, unsigned, or floating-point.
Common cases (64-bit integers and floats) are stored inline for efficiency. Rare 128-bit integers are boxed to keep the enum size small (16 bytes).
Variants§
I64(i64)
Signed 64-bit integer (common case)
U64(u64)
Unsigned 64-bit integer (common case)
F64(f64)
Floating-point number
Big(Box<BigInt>)
Large integer that doesn’t fit in 64 bits (rare)
Implementations§
Trait Implementations§
impl StructuralPartialEq for Number
Auto Trait Implementations§
impl Freeze for Number
impl RefUnwindSafe for Number
impl Send for Number
impl Sync for Number
impl Unpin for Number
impl UnsafeUnpin for Number
impl UnwindSafe for Number
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