Enum cbor_tools::CborType [−][src]
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)
Tuple Fields
0: bool
Integer(Integer)
Tuple Fields
0: Integer
ByteString(ByteString)
Tuple Fields
0: ByteString
TextString(TextString)
Tuple Fields
0: TextString
Array(Array)
Tuple Fields
0: Array
Map(Map)
Tuple Fields
0: Map
Indefinite(Indefinite)
Tuple Fields
0: Indefinite
Tagged(Tagged)
Tuple Fields
0: Tagged
Float(Float)
Tuple Fields
0: Float
Trait Implementations
Encode data to format::Element
symbols representing a CBOR encoding.
Performs the conversion.
Performs the conversion.
Auto Trait Implementations
impl RefUnwindSafe for CborType
impl UnwindSafe for CborType
Blanket Implementations
Mutably borrows from an owned value. Read more