pub enum Type {
Show 14 variants
Positive,
Negative,
Bytes,
Text,
Array,
Map,
Tag,
False,
True,
Null,
Undefined,
Float,
Byte,
Break,
}Expand description
One of CBOR possible type
Variants
Positive
CBOR Positive number between 0 to 2^64-1
Negative
CBOR Negative number representing between -1 - 0 to -1 - 2^64-1
Bytes
CBOR Byte stream (sequence of 0 to many bytes)
Text
CBOR Text (sequence of 0 to many utf8 encoded character)
Array
CBOR Array (sequence of 0 to many CBOR elements)
Map
CBOR Map (sequence of 0 to many tuple of CBOR key/value elements)
Tag
CBOR Tag (unsigned integer followed by a CBOR element)
False
CBOR False constant
True
CBOR True constant
Null
CBOR Null constant
Undefined
CBOR Undefined constant
Float
CBOR float (fp16/half precision, fp32/normal precision, fp64/double precision)
Byte
CBOR Byte (isomorphic to a u8)
Break
CBOR Break (not an element, just marking the end of a indefinite array, map, bytes, text)
Implementations
Trait Implementations
impl Copy for Type
impl Eq for Type
impl StructuralEq for Type
impl StructuralPartialEq for Type
Auto Trait Implementations
impl RefUnwindSafe for Type
impl Send for Type
impl Sync for Type
impl Unpin for Type
impl UnwindSafe for Type
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more