Trait Deserialize

Source
pub trait Deserialize: Sized {
    // Required method
    fn decode(buf: &[u8]) -> Result<(Self, &[u8]), Error>;
}

Required Methods§

Source

fn decode(buf: &[u8]) -> Result<(Self, &[u8]), Error>

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 Deserialize for u8

Source§

fn decode(buf: &[u8]) -> Result<(Self, &[u8]), Error>

Source§

impl Deserialize for u16

Source§

fn decode(buf: &[u8]) -> Result<(Self, &[u8]), Error>

Source§

impl Deserialize for u32

Source§

fn decode(buf: &[u8]) -> Result<(Self, &[u8]), Error>

Source§

impl Deserialize for u64

Source§

fn decode(buf: &[u8]) -> Result<(Self, &[u8]), Error>

Source§

impl Deserialize for u128

Source§

fn decode(buf: &[u8]) -> Result<(Self, &[u8]), Error>

Source§

impl Deserialize for usize

Source§

fn decode(buf: &[u8]) -> Result<(Self, &[u8]), Error>

Implementors§