Trait matrix_pickle::Encode
source · pub trait Encode {
// Required method
fn encode(&self, writer: &mut impl Write) -> Result<usize, EncodeError>;
// Provided method
fn encode_to_vec(&self) -> Result<Vec<u8>, EncodeError> { ... }
}
Expand description
A trait for encoding values into the matrix-pickle
binary format.
Required Methods§
Provided Methods§
sourcefn encode_to_vec(&self) -> Result<Vec<u8>, EncodeError>
fn encode_to_vec(&self) -> Result<Vec<u8>, EncodeError>
Try to encode a value into a new Vec
.
Object Safety§
This trait is not object safe.