Skip to main content

SequencerExt

Trait SequencerExt 

Source
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 { ... }
    fn sequencer_sharing(
        self,
        cfg: SequencerConfig,
        reorder: Option<SharedReorder>,
    ) -> Sequencer<Self>
       where Self::Item: Ord + PartialOrd<FrameId>,
             Self: Sized { ... }
}
Expand description

Stream extensions methods for item sequencing.

Provided Methods§

Source

fn sequencer(self, timeout: Duration, capacity: usize) -> Sequencer<Self>
where Self::Item: Ord + PartialOrd<FrameId>, Self: Sized,

Attaches a Sequencer to the underlying stream, given the item timeout and capacity of items.

Source

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,

As SequencerExt::sequencer, but discards items buffered longer than max_item_age instead of emitting them late.

Source

fn sequencer_with(self, cfg: SequencerConfig) -> Sequencer<Self>
where Self::Item: Ord + PartialOrd<FrameId>, Self: Sized,

As SequencerExt::sequencer, with every stopping rule stated explicitly.

Source

fn sequencer_sharing( self, cfg: SequencerConfig, reorder: Option<SharedReorder>, ) -> Sequencer<Self>
where Self::Item: Ord + PartialOrd<FrameId>, Self: Sized,

As SequencerExt::sequencer_with, adapting the gap wait to a window of reordering that others record into as well (the Session’s reassembler) when SequencerConfig::adapt_to_reordering is set; with reorder None, the window holds this sequencer’s own samples alone.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

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