Trait coset::TaggedCborSerializable
source · 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§
Provided Methods§
sourcefn from_tagged_slice(slice: &[u8]) -> Result<Self>
fn from_tagged_slice(slice: &[u8]) -> Result<Self>
Create an object instance from serialized CBOR data in a slice, expecting an initial tag value.
sourcefn to_tagged_vec(self) -> Result<Vec<u8>>
fn to_tagged_vec(self) -> Result<Vec<u8>>
Serialize this object to a vector, including initial tag, consuming the object along the way.
Object Safety§
This trait is not object safe.