Skip to main content

from_cbor_no_leftovers

Function from_cbor_no_leftovers 

Source
pub fn from_cbor_no_leftovers<T>(bytes: &[u8]) -> Result<T, Error>
where T: for<'d> Decode<'d, ()>,
Expand description

Decode a CBOR input, ensuring that there are no bytes leftovers once decoded. This is handy to test standalone decoders and ensures that they entirely consume their inputs.