pub trait FbStreamExt: Stream {
    // Provided methods
    fn return_remainder(
        self
    ) -> (ReturnRemainder<Self>, ConservativeReceiver<Self>)
       where Self: Sized { ... }
    fn buffered_weight_limited<'a, I, Fut>(
        self,
        params: BufferedParams
    ) -> WeightLimitedBufferedStream<'a, Self, I>
       where Self: Sized + Send + 'a + Stream<Item = (Fut, u64)>,
             Fut: Future<Output = I> { ... }
    fn whole_stream_timeout(self, timeout: Duration) -> StreamWithTimeout<Self>
       where Self: Sized { ... }
    fn yield_periodically(self) -> YieldPeriodically<Self>
       where Self: Sized { ... }
}
Expand description

A trait implemented by default for all Streams which extends the standard functionality.

Provided Methods§

source

fn return_remainder(self) -> (ReturnRemainder<Self>, ConservativeReceiver<Self>)
where Self: Sized,

Creates a stream wrapper and a future. The future will resolve into the wrapped stream when the stream wrapper returns None. It uses ConservativeReceiver to ensure that deadlocks are easily caught when one tries to poll on the receiver before consuming the stream.

source

fn buffered_weight_limited<'a, I, Fut>( self, params: BufferedParams ) -> WeightLimitedBufferedStream<'a, Self, I>
where Self: Sized + Send + 'a + Stream<Item = (Fut, u64)>, Fut: Future<Output = I>,

Like [futures::stream::StreamExt::buffered] call, but can also limit number of futures in a buffer by “weight”.

source

fn whole_stream_timeout(self, timeout: Duration) -> StreamWithTimeout<Self>
where Self: Sized,

source

fn yield_periodically(self) -> YieldPeriodically<Self>
where Self: Sized,

Construct a new self::yield_periodically::YieldPeriodically, with a sensible default.

Implementors§

source§

impl<T> FbStreamExt for T
where T: Stream + ?Sized,