Struct gjio::SocketStream [] [src]

pub struct SocketStream {
    // some fields omitted
}

A connected socket that allows reading and writing.

Trait Implementations

impl Clone for SocketStream
[src]

fn clone(&self) -> SocketStream

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more

impl AsyncRead for SocketStream
[src]

fn try_read<T>(&mut self, buf: T, min_bytes: usize) -> Promise<(T, usize)Error> where T: AsMut<[u8]>

Attempts to read buf.len() bytes from the stream, writing them into buf. Returns the modified buf,and the number of bytes actually read. Returns as soon as min_bytes are read or EOF is encountered. Read more

fn read<T>(&mut self, buf: T, min_bytes: usize) -> Promise<(T, usize)Error> where T: AsMut<[u8]>

Like try_read(), but returns an error if EOF is encountered before min_bytes can be read. Read more

impl AsyncWrite for SocketStream
[src]

fn write<T>(&mut self, buf: T) -> Promise<T, Error> where T: AsRef<[u8]>

Attempts to write all buf.len() bytes from buf into the stream. Returns buf once all of the bytes have been written. Read more