Trait libipld::codec::Codec [−][src]
Codec trait.
Provided methods
pub fn encode<T>(&self, obj: &T) -> Result<Vec<u8, Global>, Error> where
T: Encode<Self> + ?Sized,
[src]
T: Encode<Self> + ?Sized,
Encodes an encodable type.
pub fn decode<T>(&self, bytes: &[u8]) -> Result<T, Error> where
T: Decode<Self>,
[src]
T: Decode<Self>,
Decodes a decodable type.
pub fn references<T, E>(&self, bytes: &[u8], set: &mut E) -> Result<(), Error> where
T: References<Self>,
E: Extend<Cid<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>>>,
[src]
T: References<Self>,
E: Extend<Cid<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>>>,
Scrapes the references.