pub enum CBOR {
Unsigned(u64),
Negative(i64),
Bytes(Bytes),
Text(String),
Array(Vec<CBOR>),
Map(Map),
Tagged(Tag, Box<CBOR>),
Simple(Simple),
}
Expand description
A symbolic representation of CBOR data.
Unsigned integer (major type 0).
Negative integer (major type 1).
Byte string (major type 2).
UTF-8 string (major type 3).
Tagged value (major type 6).
Simple value (major type 7).
Affordances for decoding CBOR from binary representation.
Decodes the given date into CBOR symbolic representation.
Decodes the given data into CBOR symbolic representation given as a hexadecimal string.
Panics if the string is not well-formed hexadecimal with no spaces or
other characters.
Associated constants for common CBOR simple values.
The CBOR simple value representing false.
The CBOR simple value representing true.
The CBOR simple value representing null (None).
Affordances for viewing CBOR in diagnostic notation.
Returns a representation of this CBOR in diagnostic notation.
Optionally annotates the output, e.g. formatting dates and adding names
of known tags.
Returns a representation of this CBOR in diagnostic notation.
Affordances for viewing the encoded binary representation of CBOR as hexadecimal.
Returns the encoded hexadecimal representation of this CBOR.
Returns the encoded hexadecimal representation of this CBOR.
Optionally annotates the output, e.g. breaking the output up into
semantically meaningful lines, formatting dates, and adding names of
known tags.
Returns the value in CBOR symbolic representation.
Returns the value in CBOR binary representation.
Performs copy-assignment from
source.
Read more
Formats the value using the given formatter.
Read more
Formats the value using the given formatter.
Read more
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
This method tests for self and other values to be equal, and is used
by ==.
This method tests for !=. The default implementation is almost always
sufficient, and should not be overridden without very good reason.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Immutably borrows from an owned value.
Read more
Mutably borrows from an owned value.
Read more
Returns the argument unchanged.
Calls U::from(self).
That is, this conversion is whatever the implementation of
From<T> for U chooses to do.
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning.
Read more
Uses borrowed data to replace owned data, usually by cloning.
Read more
Converts the given value to a
String.
Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.