Trait StreamExt

Source
pub trait StreamExt:
    Stream
    + Send
    + Sized {
    // Provided method
    fn always_send(self) -> AlwaysSend<Self>  { ... }
}
Available on crate feature stream only.
Expand description

Convenience extension trait for easy construction of the AlwaysSend wrapper for streams in method chains.

As an extension trait, you can import this without a name, like

use always_send::StreamExt as _;

for minimizing the potential for ambiguities.

Provided Methods§

Source

fn always_send(self) -> AlwaysSend<Self>

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.

Implementors§

Source§

impl<S: Stream + Send> StreamExt for S