pub trait WriteBytes: Sized {
// Required methods
fn block_size(&self) -> u64;
fn write_bytes(
&mut self,
buf: &[u8],
) -> impl Future<Output = Result<(), Error>> + Send;
fn complete(&mut self) -> impl Future<Output = Result<(), Error>> + Send;
fn skip(
&mut self,
amount: u64,
) -> impl Future<Output = Result<(), Error>> + Send;
}
Expand description
This trait is an asynchronous streaming writer.
Required Methods§
fn block_size(&self) -> u64
Sourcefn write_bytes(
&mut self,
buf: &[u8],
) -> impl Future<Output = Result<(), Error>> + Send
fn write_bytes( &mut self, buf: &[u8], ) -> impl Future<Output = Result<(), Error>> + Send
Buffers writes to be written to the underlying handle. This may flush bytes immediately or when buffers are full.
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.