Trait libipld::codec::Decode[][src]

pub trait Decode<C> where
    C: Codec
{ pub fn decode<R>(c: C, r: &mut R) -> Result<Self, Error>
    where
        R: Read + Seek
; }

Decode trait.

This trait is generic over a codec, so that different codecs can be implemented for the same type.

Required methods

pub fn decode<R>(c: C, r: &mut R) -> Result<Self, Error> where
    R: Read + Seek
[src]

Decode from an impl Read.

It takes a specific codec as parameter, so that the Decode can be generic over an enum that contains multiple codecs.

Loading content...

Implementations on Foreign Types

impl<T> Decode<DagCborCodec> for Arc<T> where
    T: TryReadCbor
[src]

impl Decode<DagCborCodec> for u16[src]

impl<K, T> Decode<DagCborCodec> for BTreeMap<K, T> where
    T: TryReadCbor,
    K: TryReadCbor + Ord
[src]

impl<T> Decode<DagCborCodec> for Option<T> where
    T: TryReadCbor
[src]

impl Decode<DagCborCodec> for i32[src]

impl Decode<DagCborCodec> for f32[src]

impl Decode<DagCborCodec> for u64[src]

impl Decode<DagCborCodec> for i16[src]

impl Decode<DagCborCodec> for i64[src]

impl Decode<DagCborCodec> for String[src]

impl Decode<DagCborCodec> for i8[src]

impl Decode<DagCborCodec> for Box<[u8], Global>[src]

impl Decode<DagCborCodec> for u32[src]

impl<T> Decode<DagCborCodec> for Vec<T, Global> where
    T: TryReadCbor
[src]

impl Decode<DagCborCodec> for f64[src]

impl Decode<DagCborCodec> for u8[src]

impl Decode<DagCborCodec> for bool[src]

impl Decode<RawCodec> for Vec<u8, Global>[src]

impl Decode<RawCodec> for Box<[u8], Global>[src]

Loading content...

Implementors

impl Decode<IpldCodec> for Ipld[src]

impl Decode<RawCodec> for Ipld[src]

impl Decode<DagCborCodec> for Ipld[src]

impl Decode<DagCborCodec> for Cid<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>>[src]

impl Decode<DagJsonCodec> for Ipld[src]

impl Decode<DagPbCodec> for Ipld[src]

impl<C, T> Decode<C> for Link<T> where
    C: Codec,
    Cid<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>>: Decode<C>, 
[src]

Loading content...