pub trait Encode {
// Required method
fn encode(&self, w: &mut BytesMut) -> EncodeResult;
}Expand description
A value that can be encoded to protocol bytes.
Required Methods§
Sourcefn encode(&self, w: &mut BytesMut) -> EncodeResult
fn encode(&self, w: &mut BytesMut) -> EncodeResult
Appends the encoding of self to w.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".