pub trait Pack: Sized {
// Required methods
fn pack(&self, writer: &mut impl Write) -> Result<usize>;
fn unpack(reader: &mut impl Read) -> Result<Self>;
}Expand description
Implemented on types that can be packed into a platform-independent byte-stream.
This is a requirement for types that implement the dedupe encoding/decoding strategy.
Required Methods§
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.