pub trait Encodable {
// Required methods
fn encode<W: Write>(&self, writer: &mut W) -> Result<()>;
fn encoded_length(&self) -> u32;
}
Expand description
Methods for encoding an Object to bytes according to MQTT specification
Required Methods§
Sourcefn encoded_length(&self) -> u32
fn encoded_length(&self) -> u32
Length of bytes after encoded
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.