BinaryDecode

Trait BinaryDecode 

Source
pub trait BinaryDecode: Sized {
    // Required method
    fn decode(decoder: &mut DecodedData<'_>) -> Result<Self, DecodeError>;
}
Expand description

Trait for decoding values from the binary protocol. Each type specifies how to deserialize itself.

Required Methods§

Source

fn decode(decoder: &mut DecodedData<'_>) -> 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 BinaryDecode for bool

Source§

fn decode(decoder: &mut DecodedData<'_>) -> Result<bool, DecodeError>

Source§

impl BinaryDecode for f32

Source§

fn decode(decoder: &mut DecodedData<'_>) -> Result<f32, DecodeError>

Source§

impl BinaryDecode for f64

Source§

fn decode(decoder: &mut DecodedData<'_>) -> Result<f64, DecodeError>

Source§

impl BinaryDecode for i8

Source§

fn decode(decoder: &mut DecodedData<'_>) -> Result<i8, DecodeError>

Source§

impl BinaryDecode for i16

Source§

fn decode(decoder: &mut DecodedData<'_>) -> Result<i16, DecodeError>

Source§

impl BinaryDecode for i32

Source§

fn decode(decoder: &mut DecodedData<'_>) -> Result<i32, DecodeError>

Source§

impl BinaryDecode for i64

Source§

fn decode(decoder: &mut DecodedData<'_>) -> Result<i64, DecodeError>

Source§

impl BinaryDecode for i128

Source§

fn decode(decoder: &mut DecodedData<'_>) -> Result<i128, DecodeError>

Source§

impl BinaryDecode for isize

Source§

impl BinaryDecode for u8

Source§

fn decode(decoder: &mut DecodedData<'_>) -> Result<u8, DecodeError>

Source§

impl BinaryDecode for u16

Source§

fn decode(decoder: &mut DecodedData<'_>) -> Result<u16, DecodeError>

Source§

impl BinaryDecode for u32

Source§

fn decode(decoder: &mut DecodedData<'_>) -> Result<u32, DecodeError>

Source§

impl BinaryDecode for u64

Source§

fn decode(decoder: &mut DecodedData<'_>) -> Result<u64, DecodeError>

Source§

impl BinaryDecode for u128

Source§

fn decode(decoder: &mut DecodedData<'_>) -> Result<u128, DecodeError>

Source§

impl BinaryDecode for ()

Source§

fn decode(_decoder: &mut DecodedData<'_>) -> Result<(), DecodeError>

Source§

impl BinaryDecode for usize

Implementors§