Struct tamar::DataStream

source ·
pub struct DataStream<V> { /* private fields */ }

Implementations§

source§

impl<V> DataStream<V>where V: Send + Sync + 'static,

source

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

source

pub fn map<VO, FN, F>(self, map: FN) -> DataStream<VO>where VO: Send + 'static, FN: Fn(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> AsyncSingleArgFn<&'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(Event<V>, Sender<VO>) -> F + Send + Sync + 'static, F: Future<Output = ()> + Send + 'static,

source

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

source

pub fn key_by<KS, K>(self, selector: KS) -> KeyedDataStream<V, KS, K>where KS: Fn(&Event<V>) -> K, K: Hash + Eq + Send + Clone + 'static,

source§

impl<V> DataStream<V>where V: Send + Sync + Clone + 'static,

source

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

Auto Trait Implementations§

§

impl<V> !RefUnwindSafe for DataStream<V>

§

impl<V> !Send for DataStream<V>

§

impl<V> !Sync for DataStream<V>

§

impl<V> Unpin for DataStream<V>

§

impl<V> !UnwindSafe for DataStream<V>

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.