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§
Sourcefn try_clone(&self) -> Result<Self, Error>
fn try_clone(&self) -> Result<Self, Error>
Creates a new independently owned handle to the underlying stream.
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.