pub trait PayloadDecode<T>: PayloadHooks + ProtocolSchema {
// Required method
fn decode(buf: &[u8], ctx: &mut Self::Context<'_>) -> Result<T>;
}Expand description
Trait for decoding a payload from a byte buffer.
Requires PayloadHooks, so after_decode() will always be called after decoding.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".