matrix_pickle

Trait Decode

Source
pub trait Decode {
    // Required method
    fn decode(reader: &mut impl Read) -> Result<Self, DecodeError>
       where Self: Sized;

    // Provided method
    fn decode_from_slice(buffer: &[u8]) -> Result<Self, DecodeError>
       where Self: Sized { ... }
}
Expand description

A trait for decoding values that were encoded using the matrix-pickle binary format.

Required Methods§

Source

fn decode(reader: &mut impl Read) -> Result<Self, DecodeError>
where Self: Sized,

Try to read and decode a value from the given reader.

Provided Methods§

Source

fn decode_from_slice(buffer: &[u8]) -> Result<Self, DecodeError>
where Self: Sized,

Try to read and decode a value from the given byte slice.

Implementations on Foreign Types§

Source§

impl Decode for bool

Source§

fn decode(reader: &mut impl Read) -> Result<Self, DecodeError>

Source§

impl Decode for u8

Source§

fn decode(reader: &mut impl Read) -> Result<Self, DecodeError>

Source§

impl Decode for u32

Source§

fn decode(reader: &mut impl Read) -> Result<Self, DecodeError>

Source§

impl Decode for usize

Source§

fn decode(reader: &mut impl Read) -> Result<Self, DecodeError>

Source§

impl<T: Decode> Decode for Vec<T>

Source§

fn decode(reader: &mut impl Read) -> Result<Self, DecodeError>

Source§

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

Source§

fn decode(reader: &mut impl Read) -> Result<Self, DecodeError>

Source§

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

Source§

fn decode(reader: &mut impl Read) -> Result<Self, DecodeError>

Implementors§