Trait gj::io::AsyncWrite
[−]
[src]
pub trait AsyncWrite: 'static { fn write<T>(self, buf: T) -> Promise<(Self, T), Error<(Self, T)>> where T: AsRef<[u8]>, Self: Sized; }
A nonblocking output bytestream.
Required Methods
fn write<T>(self, buf: T) -> Promise<(Self, T), Error<(Self, T)>> where T: AsRef<[u8]>, Self: Sized
Attempts to write all buf.len()
bytes from buf
into the stream. Returns self
and buf
once all of the bytes have been written.