decode_from_slice_with_context

Function decode_from_slice_with_context 

Source
pub fn decode_from_slice_with_context<Context, D: Decode<Context>, C: Config>(
    src: &[u8],
    config: C,
    context: Context,
) -> Result<(D, usize), DecodeError>
Expand description

Attempt to decode a given type D from the given slice with Context. Returns the decoded output and the amount of bytes read.

Note that this does not work with borrowed types like &str or &[u8]. For that use borrow_decode_from_slice.

See the config module for more information on configurations.