Skip to main content

from_cbor_no_leftovers_with

Function from_cbor_no_leftovers_with 

Source
pub fn from_cbor_no_leftovers_with<C, T>(
    bytes: &[u8],
    ctx: &mut C,
) -> Result<T, Error>
where T: for<'d> Decode<'d, C>,
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.