#[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 retain the movable public enum API. Callers handling sensitive
documents can wrap them in zeroize::Zeroizing or call Zeroize::zeroize
when finished; codec-owned temporary values use wiping owners internally.
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
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