Struct tamar::KeyedDataStream

source ·
pub struct KeyedDataStream<V, KS, K>where
    KS: Fn(&Event<V>) -> K,{ /* private fields */ }

Implementations§

source§

impl<V, KS, K> KeyedDataStream<V, KS, K>where V: Send + Sync + 'static, KS: Fn(&Event<V>) -> K + Send + 'static, K: Hash + Eq + Send + Clone + 'static,

source

pub fn add_sink<S>(self, sink: S)where S: Sink<V> + Send + 'static,

source

pub fn map<VO, FN, F>(self, map: FN) -> DataStream<VO>where VO: Send + 'static, FN: Fn(K, Event<V>) -> F + Send + Sync + 'static, F: Future<Output = Event<VO>> + Send + 'static,

source

pub fn filter<FN>(self, filter: FN) -> DataStream<V>where FN: for<'a> AsyncDoubleArgFn<K, &'a Event<V>, Output = bool> + Send + Sync + 'static,

source

pub fn process<VO, FN, F>(self, process: FN) -> DataStream<VO>where VO: Send + 'static, FN: Fn(K, Event<V>, Sender<VO>) -> F + Send + Sync + 'static, F: Future<Output = ()> + Send + 'static,

source

pub fn process_state<VO, FN, F, GST, KSTF, KST>( self, process: FN, global_state: GST, key_state_fn: KSTF ) -> DataStream<VO>where VO: Send + 'static, FN: Fn(K, Event<V>, GST, KST, Sender<VO>) -> F + Send + Sync + 'static, F: Future<Output = ()> + Send + 'static, GST: Clone + Send + Sync + 'static, KSTF: Fn(&K) -> KST + Send + Sync + 'static, KST: Clone + Send + Sync + 'static,

source

pub fn window<WF>(self, factory: WF) -> WindowedDataStream<V, KS, WF>

source§

impl<V, KS, K> KeyedDataStream<V, KS, K>where V: Send + Sync + Clone + 'static, KS: Fn(&Event<V>) -> K + Clone,

source

pub fn split(self) -> (Self, Self)

Auto Trait Implementations§

§

impl<V, KS, K> !RefUnwindSafe for KeyedDataStream<V, KS, K>

§

impl<V, KS, K> !Send for KeyedDataStream<V, KS, K>

§

impl<V, KS, K> !Sync for KeyedDataStream<V, KS, K>

§

impl<V, KS, K> Unpin for KeyedDataStream<V, KS, K>where KS: Unpin,

§

impl<V, KS, K> !UnwindSafe for KeyedDataStream<V, KS, K>

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.