Skip to main content

StreamExt

Trait StreamExt 

Source
pub trait StreamExt: Stream + Sized {
    // Required methods
    fn until_overridden_by<Other: Stream<Item = Self::Item>>(
        self,
        other: Other,
    ) -> UntilOverriddenBy<Self, Other>;
    fn breaker(self) -> Breaker<Self>;
}
Expand description

Extension trait for Streams

Required Methods§

Source

fn until_overridden_by<Other: Stream<Item = Self::Item>>( self, other: Other, ) -> UntilOverriddenBy<Self, Other>

Yields items from the current, first, stream until an item from the other, second, stream becomes available. At that point the first stream is dropped, and only items from the second stream are yielded.

Source

fn breaker(self) -> Breaker<Self>

Like futures::stream::Fuse, but can be ‘tripped’ to cut the stream short.

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> StreamExt for S