pub struct Stream<I, T> { /* private fields */ }Expand description
Stream.
Implementations§
Source§impl<I, T> Stream<I, T>
impl<I, T> Stream<I, T>
pub fn audit<D>(&self, duration: D) -> Stream<I, T>where
D: IntoDuration,
pub fn audit_with<F, D>(&self, f: F) -> Stream<I, T>where
F: SelectFn<I, T, D>,
D: IntoDuration,
Source§impl<I, T> Stream<I, T>
impl<I, T> Stream<I, T>
pub fn coalesce<S>(&self, streams: S) -> Stream<I, T>where
S: IntoStreamSet<I, T>,
Source§impl<I, T> Stream<I, T>
impl<I, T> Stream<I, T>
pub fn debounce<D>(&self, duration: D) -> Stream<I, T>where
D: IntoDuration,
pub fn debounce_with<F, D>(&self, f: F) -> Stream<I, T>where
F: SelectFn<I, T, D>,
D: IntoDuration,
Source§impl<I, T> Stream<I, Delta<I, T>>
impl<I, T> Stream<I, Delta<I, T>>
pub fn delta_filter_map<F, U>(&self, f: F) -> Stream<I, Delta<I, U>>
Source§impl<I, T> Stream<I, Delta<I, T>>
impl<I, T> Stream<I, Delta<I, T>>
pub fn delta_reduce<F, U>(&self, f: F) -> Stream<I, U>
Source§impl<I, T> Stream<I, T>
impl<I, T> Stream<I, T>
pub fn difference<S>(&self, streams: S) -> Stream<I, T>where
S: IntoStreamSet<I, T>,
Source§impl<I, T> Stream<I, T>
impl<I, T> Stream<I, T>
pub fn intersection<S>(&self, streams: S) -> Stream<I, T>where
S: IntoStreamSet<I, T>,
Source§impl<I, T> Stream<I, T>
impl<I, T> Stream<I, T>
Source§impl<I, T> Stream<I, T>
impl<I, T> Stream<I, T>
pub fn join_filter<S, O, F>(&self, streams: S, f: F) -> Stream<I, O::Item>where
S: IntoStreamTupleCons<I, T, Output = O>,
O: IntoJoinFilter<I, All>,
F: FilterFn<I, Splat<O::Item>> + Clone,
pub fn left_join_filter<S, O, F>(&self, streams: S, f: F) -> Stream<I, O::Item>where
S: IntoStreamTupleCons<I, T, Output = O>,
O: IntoJoinFilter<I, First>,
F: FilterFn<I, Splat<O::Item>> + Clone,
pub fn full_join_filter<S, O, F>(&self, streams: S, f: F) -> Stream<I, O::Item>where
S: IntoStreamTupleCons<I, T, Output = O>,
O: IntoJoinFilter<I, Any>,
F: FilterFn<I, Splat<O::Item>> + Clone,
Source§impl<I, T> Stream<I, T>
impl<I, T> Stream<I, T>
pub fn join_filter_map<S, O, F, U>(&self, streams: S, f: F) -> Stream<I, U>where
S: IntoStreamTupleCons<I, T, Output = O>,
O: IntoJoinFilterMap<I, All>,
F: FilterMapFn<I, Splat<O::Item>, U> + Clone,
U: Value,
pub fn left_join_filter_map<S, O, F, U>(&self, streams: S, f: F) -> Stream<I, U>where
S: IntoStreamTupleCons<I, T, Output = O>,
O: IntoJoinFilterMap<I, First>,
F: FilterMapFn<I, Splat<O::Item>, U> + Clone,
U: Value,
pub fn full_join_filter_map<S, O, F, U>(&self, streams: S, f: F) -> Stream<I, U>where
S: IntoStreamTupleCons<I, T, Output = O>,
O: IntoJoinFilterMap<I, Any>,
F: FilterMapFn<I, Splat<O::Item>, U> + Clone,
U: Value,
Source§impl<I, T> Stream<I, T>
impl<I, T> Stream<I, T>
pub fn join_map<S, O, F, U>(&self, streams: S, f: F) -> Stream<I, U>where
S: IntoStreamTupleCons<I, T, Output = O>,
O: IntoJoinMap<I, All>,
F: MapFn<I, Splat<O::Item>, U> + Clone,
U: Value,
pub fn left_join_map<S, O, F, U>(&self, streams: S, f: F) -> Stream<I, U>where
S: IntoStreamTupleCons<I, T, Output = O>,
O: IntoJoinMap<I, First>,
F: MapFn<I, Splat<O::Item>, U> + Clone,
U: Value,
pub fn full_join_map<S, O, F, U>(&self, streams: S, f: F) -> Stream<I, U>where
S: IntoStreamTupleCons<I, T, Output = O>,
O: IntoJoinMap<I, Any>,
F: MapFn<I, Splat<O::Item>, U> + Clone,
U: Value,
Source§impl<I, T> Stream<I, T>
impl<I, T> Stream<I, T>
pub fn sample<D>(&self, duration: D) -> Stream<I, T>where
D: IntoDuration,
pub fn sample_with<F, D>(&self, f: F) -> Stream<I, T>where
F: SelectFn<I, T, D>,
D: IntoDuration,
Source§impl<I, T> Stream<I, T>
impl<I, T> Stream<I, T>
pub fn throttle<D>(&self, duration: D) -> Stream<I, T>where
D: IntoDuration,
pub fn throttle_with<F, D>(&self, f: F) -> Stream<I, T>where
F: SelectFn<I, T, D>,
D: IntoDuration,
Trait Implementations§
Source§impl<I, T> FromIterator<Stream<I, T>> for StreamSet<I, T>
impl<I, T> FromIterator<Stream<I, T>> for StreamSet<I, T>
Source§fn from_iter<S>(iter: S) -> Selfwhere
S: IntoIterator<Item = Stream<I, T>>,
fn from_iter<S>(iter: S) -> Selfwhere
S: IntoIterator<Item = Stream<I, T>>,
Creates a stream set from an iterator.
§Examples
use zrx_stream::combinator::{IntoStreamSet, StreamSet};
use zrx_stream::workspace::Workspace;
// Create workspace and workflow
let workspace = Workspace::<&str>::new();
let workflow = workspace.add_workflow();
// Create streams (homogeneous)
let a = workflow.add_source::<i32>();
let b = workflow.add_source::<i32>();
// Create stream set from iterator
let set = StreamSet::from_iter([a, b]);Source§impl<I, T> IntoStreamSet<I, T> for &Stream<I, T>
impl<I, T> IntoStreamSet<I, T> for &Stream<I, T>
Source§fn into_stream_set(self) -> StreamSet<I, T>
fn into_stream_set(self) -> StreamSet<I, T>
Converts a stream reference into a stream set.
Albeit this conversion is trivial, it allows to pass stream references to functions that expect sets, which can be quite convenient.
§Examples
use zrx_stream::combinator::IntoStreamSet;
use zrx_stream::workspace::Workspace;
// Create workspace and workflow
let workspace = Workspace::<&str>::new();
let workflow = workspace.add_workflow();
// Create stream
let stream = workflow.add_source::<i32>();
// Create stream set
let set = stream.into_stream_set();Source§impl<I, T> IntoStreamTuple<I> for &Stream<I, T>
impl<I, T> IntoStreamTuple<I> for &Stream<I, T>
Source§fn into_stream_tuple(self) -> Self::Output
fn into_stream_tuple(self) -> Self::Output
Converts a stream reference into a stream tuple.
Albeit this conversion is trivial, it allows to pass stream references to functions that expect tuples, which can be quite convenient.
§Examples
use zrx_stream::combinator::IntoStreamTuple;
use zrx_stream::workspace::Workspace;
// Create workspace and workflow
let workspace = Workspace::<&str>::new();
let workflow = workspace.add_workflow();
// Create stream
let stream = workflow.add_source::<i32>();
// Create stream tuple
let tuple = stream.into_stream_tuple();Source§impl<I, T, U> OperatorExt<I, T, U> for Stream<I, T>
impl<I, T, U> OperatorExt<I, T, U> for Stream<I, T>
impl<I, T> Eq for Stream<I, T>
Auto Trait Implementations§
impl<I, T> Freeze for Stream<I, T>
impl<I, T> !RefUnwindSafe for Stream<I, T>
impl<I, T> !Send for Stream<I, T>
impl<I, T> !Sync for Stream<I, T>
impl<I, T> Unpin for Stream<I, T>where
T: Unpin,
impl<I, T> UnsafeUnpin for Stream<I, T>
impl<I, T> !UnwindSafe for Stream<I, T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, E> IntoReport<T, E> for Twhere
E: Error,
impl<T, E> IntoReport<T, E> for Twhere
E: Error,
Source§fn into_report(self) -> Result<Report<T>, E>
fn into_report(self) -> Result<Report<T>, E>
Creates a report from a value T and wraps it in a result.
§Examples
use std::io::Error;
use zrx_diagnostic::report::IntoReport;
// Define function returning a value
fn f() -> impl IntoReport<i32, Error> {
42
}
// Invoke function and create report
let res = f().into_report();