Trait Decode

Source
pub trait Decode: Sized {
    // Required method
    fn decode<B: Buf>(buf: &mut B) -> Result<Self, DecodeError>;
}

Required Methods§

Source

fn decode<B: Buf>(buf: &mut B) -> Result<Self, DecodeError>

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§

impl Decode for u8

Source§

impl Decode for u32

Source§

impl Decode for u64

Source§

impl Decode for usize

Source§

impl Decode for String

Source§

fn decode<R: Buf>(r: &mut R) -> Result<Self, DecodeError>

Decode a string with a varint length prefix.

Source§

impl Decode for Vec<u8>

Source§

fn decode<B: Buf>(buf: &mut B) -> Result<Self, DecodeError>

Source§

impl Decode for Duration

Source§

fn decode<B: Buf>(buf: &mut B) -> Result<Self, DecodeError>

Implementors§