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

An abstraction over network streams.

Required Methods§

source

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

Creates a new independently owned handle to the underlying stream.

source

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

Moves this stream into or out of nonblocking mode.

source

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

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<Self>

source§

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

source§

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

source§

impl Stream for UnixStream

source§

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

source§

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

source§

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

Implementors§