timely::communication::allocator::zero_copy::stream

Trait 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.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so 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§