pub trait SequencerExt: Stream {
// Provided methods
fn sequencer(self, timeout: Duration, capacity: usize) -> Sequencer<Self>
where Self::Item: Ord + PartialOrd<FrameId>,
Self: Sized { ... }
fn sequencer_with_max_age(
self,
timeout: Duration,
capacity: usize,
max_item_age: Option<Duration>,
) -> Sequencer<Self>
where Self::Item: Ord + PartialOrd<FrameId>,
Self: Sized { ... }
fn sequencer_with(self, cfg: SequencerConfig) -> Sequencer<Self>
where Self::Item: Ord + PartialOrd<FrameId>,
Self: Sized { ... }
}Expand description
Stream extensions methods for item sequencing.
Provided Methods§
Sourcefn sequencer(self, timeout: Duration, capacity: usize) -> Sequencer<Self>
fn sequencer(self, timeout: Duration, capacity: usize) -> Sequencer<Self>
Attaches a Sequencer to the underlying stream, given the item timeout and capacity
of items.
Sourcefn sequencer_with_max_age(
self,
timeout: Duration,
capacity: usize,
max_item_age: Option<Duration>,
) -> Sequencer<Self>
fn sequencer_with_max_age( self, timeout: Duration, capacity: usize, max_item_age: Option<Duration>, ) -> Sequencer<Self>
As SequencerExt::sequencer, but discards items buffered longer than max_item_age
instead of emitting them late.
Sourcefn sequencer_with(self, cfg: SequencerConfig) -> Sequencer<Self>
fn sequencer_with(self, cfg: SequencerConfig) -> Sequencer<Self>
As SequencerExt::sequencer, with every stopping rule stated explicitly.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".