[][src]Struct cbor_tools::Tag

pub struct Tag(_);

A tag value for use with Tagged

Tags are just integers; this type exists to avoid any type confusion when passing them as function arguments.

See RFC 7049 2.4 for details.

Implementations

impl Tag[src]

impl Tag[src]

pub fn wrap(self, child: CborType) -> Tagged[src]

Use the Tag value to create a new Tagged struct.

This saves a little typing. Instead of:

Tagged::new(Tag::POS_BIGNUM, bytestring)

one can instead type:

Tag::POS_BIGNUM.wrap(bytestring)

Trait Implementations

impl Clone for Tag[src]

impl Copy for Tag[src]

impl Debug for Tag[src]

impl PartialEq<Tag> for Tag[src]

impl StructuralPartialEq for Tag[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.