pub trait WireDecode: Sized {
// Required method
fn wire_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§
Sourcefn wire_decode(data: &[u8]) -> Option<(Self, usize)>
fn wire_decode(data: &[u8]) -> Option<(Self, usize)>
Attempt to decode from the start of data.
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.