Trait libipld::codec::Decode [−][src]
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]
R: Read + Seek,
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.
Implementations on Foreign Types
impl<T> Decode<DagCborCodec> for Arc<T> where
T: TryReadCbor,
[src]
T: TryReadCbor,
impl Decode<DagCborCodec> for u16
[src]
impl<K, T> Decode<DagCborCodec> for BTreeMap<K, T> where
T: TryReadCbor,
K: TryReadCbor + Ord,
[src]
T: TryReadCbor,
K: TryReadCbor + Ord,
pub fn decode<R>(DagCborCodec, r: &mut R) -> Result<BTreeMap<K, T>, Error> where
R: Read + Seek,
[src]
R: Read + Seek,
impl<T> Decode<DagCborCodec> for Option<T> where
T: TryReadCbor,
[src]
T: TryReadCbor,
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]
pub fn decode<R>(DagCborCodec, r: &mut R) -> Result<Box<[u8], Global>, Error> where
R: Read + Seek,
[src]
R: Read + Seek,
impl Decode<DagCborCodec> for u32
[src]
impl<T> Decode<DagCborCodec> for Vec<T, Global> where
T: TryReadCbor,
[src]
T: TryReadCbor,
pub fn decode<R>(DagCborCodec, r: &mut R) -> Result<Vec<T, Global>, Error> where
R: Read + Seek,
[src]
R: Read + Seek,
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]
pub fn decode<R>(c: RawCodec, r: &mut R) -> Result<Box<[u8], Global>, Error> where
R: Read + Seek,
[src]
R: Read + Seek,
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]
pub fn decode<R>(
DagCborCodec,
r: &mut R
) -> Result<Cid<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>>, Error> where
R: Read + Seek,
[src]
DagCborCodec,
r: &mut R
) -> Result<Cid<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>>, Error> where
R: Read + Seek,
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]
C: Codec,
Cid<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>>: Decode<C>,