Trait libipld_core::codec::Encode [−][src]
Encode trait.
This trait is generic over a codec, so that different codecs can be implemented for the same type.
Required methods
fn encode<W: Write>(&self, c: C, w: &mut W) -> Result<()>
[src]
Encodes into a impl Write
.
It takes a specific codec as parameter, so that the Encode
can be generic over an enum
that contains multiple codecs.
Implementations on Foreign Types
impl Encode<RawCodec> for [u8]
[src]
impl Encode<RawCodec> for Box<[u8]>
[src]
impl Encode<RawCodec> for Vec<u8>
[src]
Loading content...Implementors
impl Encode<RawCodec> for Ipld
[src]
impl<C: Codec> Encode<C> for RawValue<C>
[src]
impl<C: Codec, T> Encode<C> for Link<T> where
Cid: Encode<C>,
[src]
Cid: Encode<C>,