pub trait Encodable {
// Required methods
fn encoded_size(&self) -> usize;
fn encode_into(&self, buf: &mut impl BufMut);
// Provided method
fn to_bytes(&self) -> Bytes { ... }
}Required Methods§
fn encoded_size(&self) -> usize
fn encode_into(&self, buf: &mut impl BufMut)
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".