Skip to main content

AsyncWriterFuture

Trait AsyncWriterFuture 

Source
pub trait AsyncWriterFuture<W: AsyncWrite>: Future<Item = (W, usize), Error = (W, Error)> {
    // Required method
    fn already_written(&self) -> usize;
}
👎Deprecated:

This was a failed attempt at finding a suitable abstraction. The async-codec crate might be what you need instead.

Expand description

Base trait for futures that write things into AsyncWrites.

The future must yield a previously wrapped AsyncWrite, and the number of written bytes. If there’s an error upon writing, the wrapped AsyncWrite is emitted together with the error.

Required Methods§

Source

fn already_written(&self) -> usize

👎Deprecated:

This was a failed attempt at finding a suitable abstraction. The async-codec crate might be what you need instead.

Return how many bytes have already been written.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§