Function libipld::codec::assert_roundtrip[][src]

pub fn assert_roundtrip<C, T>(c: C, data: &T, ipld: &Ipld) where
    C: Codec,
    T: Decode<C> + Encode<C> + Debug + PartialEq<T>,
    Ipld: Decode<C>,
    Ipld: Encode<C>, 
Expand description

Utility for testing codecs.

Encodes the data using the codec c and checks that it matches the ipld.