Function libipld::codec::assert_roundtrip
source · 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> + Encode<C>,
Expand description
Utility for testing codecs.
Encodes the data
using the codec c
and checks that it matches the ipld
.