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 AsyncWrite
s.
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§
Sourcefn 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.
fn already_written(&self) -> usize
Return how many bytes have already been written.