Trait WindowExt

Source
pub trait WindowExt: Stream {
    // Provided methods
    fn tumbling_window<'a>(
        self,
        window_size: usize,
    ) -> Pin<Box<dyn Stream<Item = Vec<Self::Item>> + 'a>>
       where Self: Unpin + Sized + 'a,
             Self::Item: Clone { ... }
    fn tumbling_window_unpin<'a>(
        self,
        window_size: usize,
    ) -> Pin<Box<dyn Stream<Item = Vec<Self::Item>> + 'a>>
       where Self: Sized + 'a,
             Self::Item: Clone { ... }
    fn sliding_window<'a>(
        self,
        window_size: usize,
    ) -> Pin<Box<dyn Stream<Item = Vec<Self::Item>> + 'a>>
       where Self: Unpin + Sized + 'a,
             Self::Item: Clone { ... }
    fn sliding_window_unpin<'a>(
        self,
        window_size: usize,
    ) -> Pin<Box<dyn Stream<Item = Vec<Self::Item>> + 'a>>
       where Self: Sized + 'a,
             Self::Item: Clone { ... }
    fn periodic_window<'a, CT>(
        self,
        clock_stream: impl Stream<Item = CT> + Unpin + 'a,
        emit_last: bool,
    ) -> Pin<Box<dyn Stream<Item = Vec<Self::Item>> + 'a>>
       where Self: Unpin + Sized + 'a { ... }
    fn periodic_window_unpin<'a, CT>(
        self,
        clock_stream: impl Stream<Item = CT> + 'a,
        emit_last: bool,
    ) -> Pin<Box<dyn Stream<Item = Vec<Self::Item>> + 'a>>
       where Self: Sized + 'a { ... }
}
Expand description

Wrappers for actual window implementations, as an extension trait.

Provided Methods§

Source

fn tumbling_window<'a>( self, window_size: usize, ) -> Pin<Box<dyn Stream<Item = Vec<Self::Item>> + 'a>>
where Self: Unpin + Sized + 'a, Self::Item: Clone,

Source

fn tumbling_window_unpin<'a>( self, window_size: usize, ) -> Pin<Box<dyn Stream<Item = Vec<Self::Item>> + 'a>>
where Self: Sized + 'a, Self::Item: Clone,

Source

fn sliding_window<'a>( self, window_size: usize, ) -> Pin<Box<dyn Stream<Item = Vec<Self::Item>> + 'a>>
where Self: Unpin + Sized + 'a, Self::Item: Clone,

Source

fn sliding_window_unpin<'a>( self, window_size: usize, ) -> Pin<Box<dyn Stream<Item = Vec<Self::Item>> + 'a>>
where Self: Sized + 'a, Self::Item: Clone,

Source

fn periodic_window<'a, CT>( self, clock_stream: impl Stream<Item = CT> + Unpin + 'a, emit_last: bool, ) -> Pin<Box<dyn Stream<Item = Vec<Self::Item>> + 'a>>
where Self: Unpin + Sized + 'a,

Source

fn periodic_window_unpin<'a, CT>( self, clock_stream: impl Stream<Item = CT> + 'a, emit_last: bool, ) -> Pin<Box<dyn Stream<Item = Vec<Self::Item>> + 'a>>
where Self: Sized + 'a,

Implementors§

Source§

impl<S> WindowExt for S
where S: Stream,