pub enum Cbor {
Break,
Undefined,
Null,
Bool(bool),
Unsigned(CborUnsigned),
Signed(CborSigned),
Float(CborFloat),
Bytes(CborBytes),
Unicode(String),
Array(Vec<Cbor>),
Map(HashMap<String, Cbor>),
Tag(CborTag),
}Expand description
CBOR abstract syntax.
This type can represent any data item described in the CBOR specification with some restrictions. Namely, CBOR maps are limited to Unicode string keys.
Note that this representation distinguishes the size of an encoded number.
Variants§
Break
A code used to signify the end of an indefinite length data item.
Undefined
An undefined data item (major type 7, value 23).
Null
A null data item (major type 7, value 22).
Bool(bool)
A boolean data item (major type 7, values 20 or 21).
Unsigned(CborUnsigned)
An unsigned integer (major type 0).
Signed(CborSigned)
A negative integer (major type 1).
Float(CborFloat)
An IEEE 754 floating point number (major type 7).
Bytes(CborBytes)
A byte string (major type 2).
Unicode(String)
A Unicode string (major type 3).
Array(Vec<Cbor>)
An array (major type 4).
Map(HashMap<String, Cbor>)
A map (major type 5).
Tag(CborTag)
A tag (major type 6).
Implementations§
Trait Implementations§
impl StructuralPartialEq for Cbor
Auto Trait Implementations§
impl Freeze for Cbor
impl RefUnwindSafe for Cbor
impl Send for Cbor
impl Sync for Cbor
impl Unpin for Cbor
impl UnwindSafe for Cbor
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)