Trait forest_encoding::Cbor[][src]

pub trait Cbor: Serialize + DeserializeOwned {
    fn marshal_cbor(&self) -> Result<Vec<u8>, Error> { ... }
fn unmarshal_cbor(bz: &[u8]) -> Result<Self, Error> { ... }
fn cid(&self) -> Result<Cid, Error> { ... } }
Expand description

Cbor utility functions for serializable objects

Provided methods

Marshalls cbor encodable object into cbor bytes

Unmarshals cbor encoded bytes to object

Returns the content identifier of the raw block of data Default is Blake2b256 hash

Implementations on Foreign Types

Implementors