Struct cbor::CborTag [] [src]

pub struct CborTag {
    pub tag: u64,
    pub data: Box<Cbor>,
}

A tag (major type 6).

Note that if you want to encode a tag, you should use the CborTagEncode type and not this type. This type is only useful when your manually expecting the structure of a CBOR data item.

Fields

tag: u64

The tag number.

You can see a list of currently assigned tag numbers here: http://www.iana.org/assignments/cbor-tags/cbor-tags.xhtml

Note that it is OK to choose your own tag number for your own application specific purpose, but it should probably be one that is currently unassigned in the IANA registry.

data: Box<Cbor>

The data item, represented in terms of CBOR abstract syntax.

Trait Implementations

impl Encodable for CborTag
[src]

fn encode<__S: Encoder>(&self, __arg_0: &mut __S) -> Result<(), __S::Error>

impl PartialEq for CborTag
[src]

fn eq(&self, __arg_0: &CborTag) -> bool

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

fn ne(&self, __arg_0: &CborTag) -> bool

This method tests for !=.

impl Debug for CborTag
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Clone for CborTag
[src]

fn clone(&self) -> CborTag

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more