pub trait Encode {
// Required methods
fn encode<W>(
&self,
writer: &mut W,
) -> impl Future<Output = Result<(), Error>> + MaybeSend
where W: Write;
fn size(&self) -> usize;
}Required Methods§
fn encode<W>(
&self,
writer: &mut W,
) -> impl Future<Output = Result<(), Error>> + MaybeSendwhere
W: Write,
fn size(&self) -> usize
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.