[][src]Enum cbor_tools::CborType

pub enum CborType {
    Null,
    Undefined,
    Bool(bool),
    Integer(Integer),
    ByteString(ByteString),
    TextString(TextString),
    Array(Array),
    Map(Map),
    Indefinite(Indefinite),
    Tagged(Tagged),
    Float(Float),
}

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

impl Clone for CborType[src]

impl Debug for CborType[src]

impl Encode for CborType[src]

impl EncodeSymbolic for CborType[src]

impl From<&'_ [u8]> for CborType[src]

impl From<&'_ str> for CborType[src]

impl From<Array> for CborType[src]

impl From<ByteString> for CborType[src]

impl From<Map> for CborType[src]

impl<T> From<T> for CborType where
    T: Into<Integer>, 
[src]

impl From<TextString> for CborType[src]

impl<K, V> From<Vec<(K, V), Global>> for CborType where
    K: Into<CborType>,
    V: Into<CborType>, 
[src]

impl<T> From<Vec<T, Global>> for CborType where
    T: Into<CborType>, 
[src]

impl From<f16> for CborType[src]

impl From<f32> for CborType[src]

impl From<f64> for CborType[src]

impl PartialEq<CborType> for CborType[src]

impl StructuralPartialEq for CborType[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.