pub trait Unpackable<'a>: Sized {
type Error: Debug;
// Required method
fn unpack<'b: 'a>(buf: &'b [u8]) -> Result<(Self, &'b [u8]), Self::Error>;
}Expand description
Unpackable objects can be deserialized from an &[u8].
The format understood by T:Unpackable must correspond to the format serialized by
T:Packable.
Required Associated Types§
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.