pub trait FixedSize: Sized + Send {
// Required methods
fn read_from<'life0, 'async_trait, R>(
reader: &'life0 mut R,
) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>>
where R: 'async_trait + AsyncRead + Unpin + Send,
Self: 'async_trait,
'life0: 'async_trait;
fn write_to<'life0, 'async_trait, W>(
self,
writer: &'life0 mut W,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where W: 'async_trait + AsyncWrite + Unpin + Send,
Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Trait for types that can be read/written as fixed-size 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.