pub enum CborType {
Null,
Undefined,
Bool(bool),
Integer(Integer),
ByteString(ByteString),
TextString(TextString),
Array(Array),
Map(Map),
Indefinite(Indefinite),
Tagged(Tagged),
Float(Float),
}Expand description
A CBOR value.
This enum can represent any CBOR value; see the documentation of each variant for more details.
Many variants can be constructed directly using from().
For example,
let i = 42;
let x = CborType::from(i);produces the same value as
let i = 42;
let x = CborType::Integer(Integer::from(i));Variants§
Null
Undefined
Bool(bool)
Integer(Integer)
ByteString(ByteString)
TextString(TextString)
Array(Array)
Map(Map)
Indefinite(Indefinite)
Tagged(Tagged)
Float(Float)
Trait Implementations§
Source§impl EncodeSymbolic for CborType
impl EncodeSymbolic for CborType
Source§fn encode_symbolic(&self) -> Vec<Element>
fn encode_symbolic(&self) -> Vec<Element>
Encode data to
format::Element symbols representing a CBOR encoding.Source§impl From<ByteString> for CborType
impl From<ByteString> for CborType
Source§fn from(x: ByteString) -> CborType
fn from(x: ByteString) -> CborType
Converts to this type from the input type.
Source§impl From<TextString> for CborType
impl From<TextString> for CborType
Source§fn from(x: TextString) -> CborType
fn from(x: TextString) -> CborType
Converts to this type from the input type.
impl StructuralPartialEq for CborType
Auto Trait Implementations§
impl Freeze for CborType
impl RefUnwindSafe for CborType
impl Send for CborType
impl Sync for CborType
impl Unpin for CborType
impl UnwindSafe for CborType
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