pub trait Encodable {
// Required methods
fn encode<W: SyncWrite>(&self, writer: &mut W) -> Result<(), Error>;
fn encode_len(&self) -> usize;
}
Expand description
The ability of encoding type into write trait, and calculating encoded size.
Required Methods§
Sourcefn encode_len(&self) -> usize
fn encode_len(&self) -> usize
Calculate the encoded size.
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.