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§
Provided Methods§
Sourcefn decode_from_slice(buffer: &[u8]) -> Result<Self, DecodeError>where
Self: Sized,
fn decode_from_slice(buffer: &[u8]) -> Result<Self, DecodeError>where
Self: Sized,
Try to read and decode a value from the given byte slice.