pub enum Immediate<'a> {
Null,
Bool(bool),
Int64(i64),
Float(f64),
String(&'a str),
Bytes(&'a [u8]),
Variant0(VariantIdx),
Ref(Offset),
Pointer(Offset),
}Expand description
Immediate value, without nesting.
An immediate value is one that can be skipped over efficiently. Only immediate values can be stored in arrays and maps; more complex values have to be stored indirectly via a reference.
Variants§
Null
CBOR/JSON null.
Bool(bool)
Int64(i64)
Float(f64)
String(&'a str)
Text, in UTF8
Bytes(&'a [u8])
Binary blob.
Variant0(VariantIdx)
A variant with 0 arguments.
Ref(Offset)
An explicit reference to a full value (which comes at an earlier offset).
Pointer(Offset)
An automatically followed reference to a full value (which comes at an earlier offset).
Trait Implementations§
impl<'a> Copy for Immediate<'a>
impl<'a> StructuralPartialEq for Immediate<'a>
Auto Trait Implementations§
impl<'a> Freeze for Immediate<'a>
impl<'a> RefUnwindSafe for Immediate<'a>
impl<'a> Send for Immediate<'a>
impl<'a> Sync for Immediate<'a>
impl<'a> Unpin for Immediate<'a>
impl<'a> UnwindSafe for Immediate<'a>
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