pub trait FromBytesWithInput<'a>: Sized + Debug {
    type Input: Debug;

    fn from_bytes_with_input(
        buffer: &mut Cursor<&'a [u8]>,
        input: Self::Input
    ) -> Result<Self, DeError>; }
Expand description

Takes an arbitrary input which serves as additional information for guiding the conversion from a byte buffer to a data structure. A common workflow is a data structure that has a size to determine how much more of the data in the byte buffer is part of a given data structure.

Required Associated Types§

The type of the additional input.

Required Methods§

Takes a byte buffer and an additional input and returns the deserialized data structure.

Implementations on Foreign Types§

Implementors§