pub trait TaggedCborSerializable: AsCborValue {
    const TAG: u64;

    // Provided methods
    fn from_tagged_slice(slice: &[u8]) -> Result<Self> { ... }
    fn to_tagged_vec(self) -> Result<Vec<u8>> { ... }
}
Expand description

Extension trait that adds tagged serialization/deserialization methods.

Required Associated Constants§

source

const TAG: u64

The associated tag value.

Provided Methods§

source

fn from_tagged_slice(slice: &[u8]) -> Result<Self>

Create an object instance from serialized CBOR data in a slice, expecting an initial tag value.

source

fn to_tagged_vec(self) -> Result<Vec<u8>>

Serialize this object to a vector, including initial tag, consuming the object along the way.

Implementors§