pub trait WriteDyn:
Unpin
+ Send
+ Sync {
// Required methods
fn write_dyn(
&mut self,
bs: Buffer,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + '_>>;
fn close_dyn(
&mut self,
) -> Pin<Box<dyn Future<Output = Result<Metadata, Error>> + Send + '_>>;
fn abort_dyn(
&mut self,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + '_>>;
}Expand description
WriteDyn is the dyn version of Write make it possible to use as
Box<dyn WriteDyn>.
Required Methods§
Sourcefn write_dyn(
&mut self,
bs: Buffer,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + '_>>
fn write_dyn( &mut self, bs: Buffer, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + '_>>
The dyn version of Write::write.