AdvancedAnalyticsExt

Trait AdvancedAnalyticsExt 

Source
pub trait AdvancedAnalyticsExt:
    Stream
    + Send
    + Sized
    + 'static {
    // Provided methods
    fn window_by_time_rs2<F>(
        self,
        config: TimeWindowConfig,
        timestamp_fn: F,
    ) -> RS2Stream<TimeWindow<<Self as Stream>::Item>>
       where <Self as Stream>::Item: Clone + Send + 'static,
             F: Fn(&<Self as Stream>::Item) -> SystemTime + Send + 'static { ... }
    fn join_with_time_window_rs2<T2, F, G1, G2, K, FK1, FK2>(
        self,
        other: RS2Stream<T2>,
        config: TimeJoinConfig,
        timestamp_fn1: G1,
        timestamp_fn2: G2,
        join_fn: F,
        key_selector: Option<(FK1, FK2)>,
    ) -> RS2Stream<(Self::Item, T2)>
       where Self::Item: Clone + Send + Sync + 'static,
             T2: Clone + Send + Sync + 'static,
             F: Fn(Self::Item, T2) -> (Self::Item, T2) + Send + 'static,
             G1: Fn(&Self::Item) -> SystemTime + Send + 'static,
             G2: Fn(&T2) -> SystemTime + Send + 'static,
             K: Eq + Hash,
             FK1: Fn(&Self::Item) -> K + Send + Sync + 'static,
             FK2: Fn(&T2) -> K + Send + Sync + 'static { ... }
}
Expand description

Extension trait for advanced analytics

Provided Methods§

Source

fn window_by_time_rs2<F>( self, config: TimeWindowConfig, timestamp_fn: F, ) -> RS2Stream<TimeWindow<<Self as Stream>::Item>>
where <Self as Stream>::Item: Clone + Send + 'static, F: Fn(&<Self as Stream>::Item) -> SystemTime + Send + 'static,

Apply time-based windowing to the stream

Source

fn join_with_time_window_rs2<T2, F, G1, G2, K, FK1, FK2>( self, other: RS2Stream<T2>, config: TimeJoinConfig, timestamp_fn1: G1, timestamp_fn2: G2, join_fn: F, key_selector: Option<(FK1, FK2)>, ) -> RS2Stream<(Self::Item, T2)>
where Self::Item: Clone + Send + Sync + 'static, T2: Clone + Send + Sync + 'static, F: Fn(Self::Item, T2) -> (Self::Item, T2) + Send + 'static, G1: Fn(&Self::Item) -> SystemTime + Send + 'static, G2: Fn(&T2) -> SystemTime + Send + 'static, K: Eq + Hash, FK1: Fn(&Self::Item) -> K + Send + Sync + 'static, FK2: Fn(&T2) -> K + Send + Sync + 'static,

Join with another stream using time windows

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> AdvancedAnalyticsExt for S
where S: Stream + Send + Sized + 'static,