Trait timely::communication::allocator::zero_copy::stream::Stream

source ·
pub trait Stream:
    Sized
    + Send
    + Sync
    + Read
    + Write {
    // Required methods
    fn try_clone(&self) -> Result<Self, Error>;
    fn set_nonblocking(&self, nonblocking: bool) -> Result<(), Error>;
    fn shutdown(&self, how: Shutdown) -> Result<(), Error>;
}
Expand description

An abstraction over network streams.

Required Methods§

source

fn try_clone(&self) -> Result<Self, Error>

Creates a new independently owned handle to the underlying stream.

source

fn set_nonblocking(&self, nonblocking: bool) -> Result<(), Error>

Moves this stream into or out of nonblocking mode.

source

fn shutdown(&self, how: Shutdown) -> Result<(), Error>

Shuts down the read, write, or both halves of this connection.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Stream for TcpStream

source§

fn try_clone(&self) -> Result<TcpStream, Error>

source§

fn set_nonblocking(&self, nonblocking: bool) -> Result<(), Error>

source§

fn shutdown(&self, how: Shutdown) -> Result<(), Error>

source§

impl Stream for UnixStream

Implementors§