pub trait Stream:
AsyncRead
+ AsyncWrite
+ StreamMetadata
+ Send
+ Unpin
+ AsHandle
+ 'static {
// Provided methods
fn downcast<S: Stream + 'static>(self) -> Result<S, Self>
where Self: Sized + 'static { ... }
fn boxed(self) -> Box<dyn Stream + Send>
where Self: Sized + 'static { ... }
}Expand description
A convenience trait for streams from this crate.
Provided Methods§
Trait Implementations§
Source§impl LocalAddress for Box<dyn Stream + Send>
impl LocalAddress for Box<dyn Stream + Send>
fn local_address(&self) -> Result<ResolvedTarget>
Source§impl RemoteAddress for Box<dyn Stream + Send>
impl RemoteAddress for Box<dyn Stream + Send>
fn remote_address(&self) -> Result<ResolvedTarget>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".