Enum cbor::Cbor[][src]

pub enum Cbor {
    Break,
    Undefined,
    Null,
    Bool(bool),
    Unsigned(CborUnsigned),
    Signed(CborSigned),
    Float(CborFloat),
    Bytes(CborBytes),
    Unicode(String),
    Array(Vec<Cbor>),
    Map(HashMap<String, Cbor>),
    Tag(CborTag),
}

CBOR abstract syntax.

This type can represent any data item described in the CBOR specification with some restrictions. Namely, CBOR maps are limited to Unicode string keys.

Note that this representation distinguishes the size of an encoded number.

Variants

A code used to signify the end of an indefinite length data item.

An undefined data item (major type 7, value 23).

A null data item (major type 7, value 22).

A boolean data item (major type 7, values 20 or 21).

An unsigned integer (major type 0).

A negative integer (major type 1).

An IEEE 754 floating point number (major type 7).

A byte string (major type 2).

A Unicode string (major type 3).

An array (major type 4).

A map (major type 5).

A tag (major type 6).

Methods

impl Cbor
[src]

Decode a single CBOR value.

If this is a CBOR tag, return the tag number.

Trait Implementations

impl ToJson for Cbor
[src]

Converts the value of self to an instance of JSON

impl Clone for Cbor
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Cbor
[src]

Formats the value using the given formatter. Read more

impl PartialEq for Cbor
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Encodable for Cbor
[src]

Serialize a value using an Encoder.

Auto Trait Implementations

impl Send for Cbor

impl Sync for Cbor