DecodeWith

Trait DecodeWith 

Source
pub trait DecodeWith<'buf>: Sized {
    type State;

    // Required method
    fn decode_with(r: &mut Reader<'buf>, state: Self::State) -> Option<Self>;
}
Expand description

The Decode trait extension to decode a value with some state.

Required Associated Types§

Required Methods§

Source

fn decode_with(r: &mut Reader<'buf>, state: Self::State) -> Option<Self>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<'buf> DecodeWith<'buf> for &'buf [u8]

Source§

type State = usize

Source§

fn decode_with(r: &mut Reader<'buf>, len: Self::State) -> Option<Self>

Implementors§

Source§

impl<'buf, D> DecodeWith<'buf> for D
where D: Decode<'buf>,