#[non_exhaustive]pub enum CborValue {
Null,
Bool(bool),
Int(i64),
String(String),
Bytes(Vec<u8>),
Array(Vec<CborValue>),
Map(Vec<(String, CborValue)>),
}Expand description
A decoded DAG-CBOR value.
Values wipe owned text and byte buffers on drop. Callers can also call
Zeroize::zeroize to clear a value before its owner is dropped.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Null
CBOR null.
Bool(bool)
CBOR boolean.
Int(i64)
A signed integer within the i64 range.
String(String)
A UTF-8 text string.
Bytes(Vec<u8>)
A byte string.
Array(Vec<CborValue>)
An array of values.
Map(Vec<(String, CborValue)>)
A map of text-string keys to values, in canonical key order.
Trait Implementations§
impl StructuralPartialEq for CborValue
impl ZeroizeOnDrop for CborValue
Auto Trait Implementations§
impl Freeze for CborValue
impl RefUnwindSafe for CborValue
impl Send for CborValue
impl Sync for CborValue
impl Unpin for CborValue
impl UnsafeUnpin for CborValue
impl UnwindSafe for CborValue
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