Trait Decode

Source
pub trait Decode: Sized {
    // Required method
    fn decode(reader: impl AsMut<Reader>) -> Result<Self, EndOfInput>;
}
Expand description

A trait for decoding types.

Required Methods§

Source

fn decode(reader: impl AsMut<Reader>) -> Result<Self, EndOfInput>

Attempt to decode the type from the reader.

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 Decode for i8

Source§

fn decode(reader: impl AsMut<Reader>) -> Result<Self, EndOfInput>

Source§

impl Decode for u8

Source§

fn decode(reader: impl AsMut<Reader>) -> Result<Self, EndOfInput>

Implementors§