pub trait Decode: Sized {
// Required method
fn decode(data: &[u8]) -> Option<(Self, usize)>;
}Expand description
Decode a value from a byte slice in conduit’s binary wire format.
Returns the decoded value together with the number of bytes consumed,
or None if the data is too short or malformed.
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.