pub trait Deserialize: Sized {
    // Required method
    fn deserialize<R: Read>(codec: &mut Codec<R>) -> Result<Self, ReadError>;

    // Provided method
    fn deserialize_validate<R: Read>(
        codec: &mut Codec<R>
    ) -> Result<(), ReadError> { ... }
}
Expand description

Define that an object that can be read from an std::io::Read object.

Required Methods§

source

fn deserialize<R: Read>(codec: &mut Codec<R>) -> Result<Self, ReadError>

Provided Methods§

Implementations on Foreign Types§

source§

impl Deserialize for ()

source§

impl<const N: usize> Deserialize for [u8; N]

source§

fn deserialize<R: Read>(codec: &mut Codec<R>) -> Result<Self, ReadError>

Implementors§