Trait fvm_ipld_encoding::Cbor
source · pub trait Cbor: Serialize + DeserializeOwned {
// Provided methods
fn marshal_cbor(&self) -> Result<Vec<u8>, Error> { ... }
fn unmarshal_cbor(bz: &[u8]) -> Result<Self, Error> { ... }
}
👎Deprecated: use to_vec or from_slice directly
Expand description
Cbor utility functions for serializable objects
Provided Methods§
sourcefn marshal_cbor(&self) -> Result<Vec<u8>, Error>
👎Deprecated: use to_vec or from_slice directly
fn marshal_cbor(&self) -> Result<Vec<u8>, Error>
Marshalls cbor encodable object into cbor bytes
sourcefn unmarshal_cbor(bz: &[u8]) -> Result<Self, Error>
👎Deprecated: use to_vec or from_slice directly
fn unmarshal_cbor(bz: &[u8]) -> Result<Self, Error>
Unmarshals cbor encoded bytes to object
Object Safety§
This trait is not object safe.