pub trait Decode<V>: Sized {
// Required method
fn decode<B: Buf>(buf: &mut B, version: V) -> Result<Self, DecodeError>;
}Expand description
Read the from the buffer using the given version.
If DecodeError::Short is returned, the caller should try again with more data.
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.