Trait coset::TaggedCborSerializable [−][src]
pub trait TaggedCborSerializable: AsCborValue {
const TAG: u64;
fn from_tagged_reader<R: Read>(reader: R) -> Result<Self> { ... }
fn from_tagged_slice(slice: &[u8]) -> Result<Self> { ... }
fn to_tagged_vec(&self) -> Result<Vec<u8>> { ... }
fn to_tagged_writer<W: Write>(&self, writer: W) -> Result<()> { ... }
}
Expand description
Extension trait that adds tagged serialization/deserialization methods.
Associated Constants
Provided methods
fn from_tagged_reader<R: Read>(reader: R) -> Result<Self>
fn from_tagged_reader<R: Read>(reader: R) -> Result<Self>
Create an object instance by reading serialized CBOR data from std::io::Read
instance,
expecting an initial tag value.
Create an object instance from serialized CBOR data in a slice, expecting an initial tag value.
fn to_tagged_vec(&self) -> Result<Vec<u8>>
fn to_tagged_vec(&self) -> Result<Vec<u8>>
Serialize this object to a vector, including initial tag.
fn to_tagged_writer<W: Write>(&self, writer: W) -> Result<()>
fn to_tagged_writer<W: Write>(&self, writer: W) -> Result<()>
Serialize this object to a std::io::Write
instance, including initial tag.