pub trait Encode {
// Required methods
fn size(&self) -> usize;
fn encode_to<'life0, 'life1, 'async_trait, W>(
&'life0 self,
config: &'life1 Config,
writer: W,
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>
where W: Write + Unpin + Send + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Trait for encoding values
Required Methods§
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.