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§

source

fn marshal_cbor(&self) -> Result<Vec<u8>, Error>

👎Deprecated: use to_vec or from_slice directly

Marshalls cbor encodable object into cbor bytes

source

fn unmarshal_cbor(bz: &[u8]) -> Result<Self, Error>

👎Deprecated: use to_vec or from_slice directly

Unmarshals cbor encoded bytes to object

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<T> Cbor for Option<T>
where T: Cbor,

source§

impl<T> Cbor for Vec<T>
where T: Cbor,

Implementors§