pub trait Decode<'de>: Sized {
// Required method
fn decode<B: Buf>(buf: &mut B, version: i16) -> Result<Self, ProtocolError>;
}Expand description
Decode a Kafka wire-protocol value from a buffer at the given protocol version.
The 'de lifetime is the lifetime the decoded value may borrow from the input.
Owned-flavor types implement Decode<'de> for any 'de (their output is 'static).
Borrowed-flavor types implement Decode<'de> where Self: 'de.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".