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