Trait DistributedStream
Source pub trait DistributedStream {
type Item;
type Task: StreamTask<Item = Self::Item> + ProcessSend;
Show 35 methods
// Required methods
fn next_task(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
) -> Poll<Option<Self::Task>>;
fn size_hint(&self) -> (usize, Option<usize>);
// Provided methods
fn reduce<'life0, 'async_trait, P, B, R1, R2, R3>(
self,
pool: &'life0 P,
reduce_a: R1,
reduce_b: R2,
reduce_c: R3,
) -> Pin<Box<dyn Future<Output = B> + 'async_trait>>
where P: ProcessPool + 'async_trait,
R1: ReducerSend<Self::Item> + Clone + ProcessSend + 'static + 'async_trait,
R2: ReducerProcessSend<<R1 as ReducerSend<Self::Item>>::Done> + Clone + ProcessSend + 'static + 'async_trait,
R3: Reducer<<R2 as ReducerProcessSend<<R1 as ReducerSend<Self::Item>>::Done>>::Done, Done = B> + 'async_trait,
Self::Task: 'static,
Self: Sized + 'async_trait,
B: 'async_trait,
'life0: 'async_trait { ... }
fn pipe<'life0, 'async_trait, P, DistSink, A>(
self,
pool: &'life0 P,
sink: DistSink,
) -> Pin<Box<dyn Future<Output = A> + 'async_trait>>
where P: ProcessPool + 'async_trait,
DistSink: DistributedSink<Self::Item, Done = A> + 'async_trait,
<DistSink::Pipe as DistributedPipe<Self::Item>>::Task: 'static,
DistSink::ReduceA: 'static,
DistSink::ReduceB: 'static,
Self::Task: 'static,
Self: Sized + 'async_trait,
A: 'async_trait,
'life0: 'async_trait { ... }
fn fork<'life0, 'async_trait, P, DistSinkA, DistSinkB, A, B>(
self,
pool: &'life0 P,
sink_a: DistSinkA,
sink_b: DistSinkB,
) -> Pin<Box<dyn Future<Output = (A, B)> + 'async_trait>>
where P: ProcessPool + 'async_trait,
DistSinkA: DistributedSink<Self::Item, Done = A> + 'async_trait,
DistSinkB: for<'a> DistributedSink<&'a Self::Item, Done = B> + 'static + 'async_trait,
<DistSinkA::Pipe as DistributedPipe<Self::Item>>::Task: 'static,
DistSinkA::ReduceA: 'static,
DistSinkA::ReduceB: 'static,
<DistSinkB as DistributedSink<&'static Self::Item>>::ReduceA: 'static,
<DistSinkB as DistributedSink<&'static Self::Item>>::ReduceB: 'static,
<<DistSinkB as DistributedSink<&'static Self::Item>>::Pipe as DistributedPipe<&'static Self::Item>>::Task: 'static,
Self::Item: 'static,
Self::Task: 'static,
Self: Sized + 'async_trait,
A: 'async_trait,
B: 'async_trait,
'life0: 'async_trait { ... }
fn group_by<'life0, 'async_trait, P, S, A, B>(
self,
pool: &'life0 P,
sink: S,
) -> Pin<Box<dyn Future<Output = IndexMap<A, S::Done>> + 'async_trait>>
where P: ProcessPool + 'async_trait,
A: Eq + Hash + ProcessSend + 'static + 'async_trait,
B: 'static + 'async_trait,
S: DistributedSink<B> + 'async_trait,
<S::Pipe as DistributedPipe<B>>::Task: Clone + ProcessSend + 'static,
S::ReduceA: 'static,
S::ReduceB: 'static,
S::ReduceC: Clone,
S::Done: ProcessSend + 'static,
Self::Task: 'static,
Self: DistributedStream<Item = (A, B)> + Sized + 'async_trait,
'life0: 'async_trait { ... }
fn collect<'life0, 'async_trait, P, B>(
self,
pool: &'life0 P,
) -> Pin<Box<dyn Future<Output = B> + 'async_trait>>
where P: ProcessPool + 'async_trait,
B: FromDistributedStream<Self::Item> + 'async_trait,
B::ReduceA: ProcessSend + 'static,
B::ReduceB: ProcessSend + 'static,
Self::Task: 'static,
Self: Sized + 'async_trait,
'life0: 'async_trait { ... }
fn inspect<F>(self, f: F) -> Inspect<Self, F>
where F: FnMut(&Self::Item) + Clone + ProcessSend + 'static,
Self: Sized { ... }
fn update<F>(self, f: F) -> Update<Self, F>
where F: FnMut(&mut Self::Item) + Clone + ProcessSend + 'static,
Self: Sized { ... }
fn map<B, F>(self, f: F) -> Map<Self, F>
where F: FnMut(Self::Item) -> B + Clone + ProcessSend + 'static,
Self: Sized { ... }
fn flat_map<B, F>(self, f: F) -> FlatMap<Self, F>
where F: FnMut(Self::Item) -> B + Clone + ProcessSend + 'static,
B: Stream,
Self: Sized { ... }
fn filter<F>(self, f: F) -> Filter<Self, F>
where F: FnMut(&Self::Item) -> bool + Clone + ProcessSend + 'static,
Self: Sized { ... }
fn left_join<K, V1, V2>(
self,
right: impl IntoIterator<Item = (K, V2)>,
) -> LeftJoin<Self, K, V1, V2>
where K: Eq + Hash + Clone + ProcessSend + 'static,
V1: 'static,
V2: Clone + ProcessSend + 'static,
Self: DistributedStream<Item = (K, V1)> + Sized { ... }
fn inner_join<K, V1, V2>(
self,
right: impl IntoIterator<Item = (K, V2)>,
) -> InnerJoin<Self, K, V1, V2>
where K: Eq + Hash + Clone + ProcessSend + 'static,
V1: 'static,
V2: Clone + ProcessSend + 'static,
Self: DistributedStream<Item = (K, V1)> + Sized { ... }
fn chain<C>(self, chain: C) -> Chain<Self, C::DistStream>
where C: IntoDistributedStream<Item = Self::Item>,
Self: Sized { ... }
fn for_each<'life0, 'async_trait, P, F>(
self,
pool: &'life0 P,
f: F,
) -> Pin<Box<dyn Future<Output = ()> + 'async_trait>>
where P: ProcessPool + 'async_trait,
F: FnMut(Self::Item) + Clone + ProcessSend + 'static + 'async_trait,
Self::Item: 'static,
Self::Task: 'static,
Self: Sized + 'async_trait,
'life0: 'async_trait { ... }
fn fold<'life0, 'async_trait, P, ID, F, B>(
self,
pool: &'life0 P,
identity: ID,
op: F,
) -> Pin<Box<dyn Future<Output = B> + 'async_trait>>
where P: ProcessPool + 'async_trait,
ID: FnMut() -> B + Clone + ProcessSend + 'static + 'async_trait,
F: FnMut(B, Either<Self::Item, B>) -> B + Clone + ProcessSend + 'static + 'async_trait,
B: ProcessSend + 'static + 'async_trait,
Self::Item: 'static,
Self::Task: 'static,
Self: Sized + 'async_trait,
'life0: 'async_trait { ... }
fn histogram<'life0, 'async_trait, P>(
self,
pool: &'life0 P,
) -> Pin<Box<dyn Future<Output = Vec<(Self::Item, usize)>> + 'async_trait>>
where P: ProcessPool + 'async_trait,
Self::Item: Hash + Ord + ProcessSend + 'static,
Self::Task: 'static,
Self: Sized + 'async_trait,
'life0: 'async_trait { ... }
fn sort_n_by<'life0, 'async_trait, P, F>(
self,
pool: &'life0 P,
n: usize,
cmp: F,
) -> Pin<Box<dyn Future<Output = Sort<Self::Item, F>> + 'async_trait>>
where P: ProcessPool + 'async_trait,
F: Fn(&Self::Item, &Self::Item) -> Ordering + Clone + ProcessSend + 'static + 'async_trait,
Self::Item: Clone + ProcessSend + 'static,
Self::Task: 'static,
Self: Sized + 'async_trait,
'life0: 'async_trait { ... }
fn count<'life0, 'async_trait, P>(
self,
pool: &'life0 P,
) -> Pin<Box<dyn Future<Output = usize> + 'async_trait>>
where P: ProcessPool + 'async_trait,
Self::Item: 'static,
Self::Task: 'static,
Self: Sized + 'async_trait,
'life0: 'async_trait { ... }
fn sum<'life0, 'async_trait, P, S>(
self,
pool: &'life0 P,
) -> Pin<Box<dyn Future<Output = S> + 'async_trait>>
where P: ProcessPool + 'async_trait,
S: Sum<Self::Item> + Sum<S> + ProcessSend + 'static + 'async_trait,
Self::Item: 'static,
Self::Task: 'static,
Self: Sized + 'async_trait,
'life0: 'async_trait { ... }
fn mean<'life0, 'async_trait, P>(
self,
pool: &'life0 P,
) -> Pin<Box<dyn Future<Output = f64> + 'async_trait>>
where P: ProcessPool + 'async_trait,
Self::Item: 'static,
Self::Task: 'static,
Self: DistributedStream<Item = f64> + Sized + 'async_trait,
'life0: 'async_trait { ... }
fn stddev<'life0, 'async_trait, P>(
self,
pool: &'life0 P,
) -> Pin<Box<dyn Future<Output = f64> + 'async_trait>>
where P: ProcessPool + 'async_trait,
Self::Item: 'static,
Self::Task: 'static,
Self: DistributedStream<Item = f64> + Sized + 'async_trait,
'life0: 'async_trait { ... }
fn combine<'life0, 'async_trait, P, F>(
self,
pool: &'life0 P,
f: F,
) -> Pin<Box<dyn Future<Output = Option<Self::Item>> + 'async_trait>>
where P: ProcessPool + 'async_trait,
F: FnMut(Self::Item, Self::Item) -> Self::Item + Clone + ProcessSend + 'static + 'async_trait,
Self::Item: ProcessSend + 'static,
Self::Task: 'static,
Self: Sized + 'async_trait,
'life0: 'async_trait { ... }
fn max<'life0, 'async_trait, P>(
self,
pool: &'life0 P,
) -> Pin<Box<dyn Future<Output = Option<Self::Item>> + 'async_trait>>
where P: ProcessPool + 'async_trait,
Self::Item: Ord + ProcessSend + 'static,
Self::Task: 'static,
Self: Sized + 'async_trait,
'life0: 'async_trait { ... }
fn max_by<'life0, 'async_trait, P, F>(
self,
pool: &'life0 P,
f: F,
) -> Pin<Box<dyn Future<Output = Option<Self::Item>> + 'async_trait>>
where P: ProcessPool + 'async_trait,
F: FnMut(&Self::Item, &Self::Item) -> Ordering + Clone + ProcessSend + 'static + 'async_trait,
Self::Item: ProcessSend + 'static,
Self::Task: 'static,
Self: Sized + 'async_trait,
'life0: 'async_trait { ... }
fn max_by_key<'life0, 'async_trait, P, F, B>(
self,
pool: &'life0 P,
f: F,
) -> Pin<Box<dyn Future<Output = Option<Self::Item>> + 'async_trait>>
where P: ProcessPool + 'async_trait,
F: FnMut(&Self::Item) -> B + Clone + ProcessSend + 'static + 'async_trait,
B: Ord + 'static + 'async_trait,
Self::Item: ProcessSend + 'static,
Self::Task: 'static,
Self: Sized + 'async_trait,
'life0: 'async_trait { ... }
fn min<'life0, 'async_trait, P>(
self,
pool: &'life0 P,
) -> Pin<Box<dyn Future<Output = Option<Self::Item>> + 'async_trait>>
where P: ProcessPool + 'async_trait,
Self::Item: Ord + ProcessSend + 'static,
Self::Task: 'static,
Self: Sized + 'async_trait,
'life0: 'async_trait { ... }
fn min_by<'life0, 'async_trait, P, F>(
self,
pool: &'life0 P,
f: F,
) -> Pin<Box<dyn Future<Output = Option<Self::Item>> + 'async_trait>>
where P: ProcessPool + 'async_trait,
F: FnMut(&Self::Item, &Self::Item) -> Ordering + Clone + ProcessSend + 'static + 'async_trait,
Self::Item: ProcessSend + 'static,
Self::Task: 'static,
Self: Sized + 'async_trait,
'life0: 'async_trait { ... }
fn min_by_key<'life0, 'async_trait, P, F, B>(
self,
pool: &'life0 P,
f: F,
) -> Pin<Box<dyn Future<Output = Option<Self::Item>> + 'async_trait>>
where P: ProcessPool + 'async_trait,
F: FnMut(&Self::Item) -> B + Clone + ProcessSend + 'static + 'async_trait,
B: Ord + 'static + 'async_trait,
Self::Item: ProcessSend + 'static,
Self::Task: 'static,
Self: Sized + 'async_trait,
'life0: 'async_trait { ... }
fn most_frequent<'life0, 'async_trait, P>(
self,
pool: &'life0 P,
n: usize,
probability: f64,
tolerance: f64,
) -> Pin<Box<dyn Future<Output = Top<Self::Item, usize>> + 'async_trait>>
where P: ProcessPool + 'async_trait,
Self::Item: Hash + Eq + Clone + ProcessSend + 'static,
Self::Task: 'static,
Self: Sized + 'async_trait,
'life0: 'async_trait { ... }
fn most_distinct<'life0, 'async_trait, P, A, B>(
self,
pool: &'life0 P,
n: usize,
probability: f64,
tolerance: f64,
error_rate: f64,
) -> Pin<Box<dyn Future<Output = Top<A, HyperLogLogMagnitude<B>>> + 'async_trait>>
where P: ProcessPool + 'async_trait,
Self: DistributedStream<Item = (A, B)> + Sized + 'async_trait,
A: Hash + Eq + Clone + ProcessSend + 'static + 'async_trait,
B: Hash + 'static + 'async_trait,
Self::Task: 'static,
'life0: 'async_trait { ... }
fn sample_unstable<'life0, 'async_trait, P>(
self,
pool: &'life0 P,
samples: usize,
) -> Pin<Box<dyn Future<Output = SampleUnstable<Self::Item>> + 'async_trait>>
where P: ProcessPool + 'async_trait,
Self::Item: ProcessSend + 'static,
Self::Task: 'static,
Self: Sized + 'async_trait,
'life0: 'async_trait { ... }
fn all<'life0, 'async_trait, P, F>(
self,
pool: &'life0 P,
f: F,
) -> Pin<Box<dyn Future<Output = bool> + 'async_trait>>
where P: ProcessPool + 'async_trait,
F: FnMut(Self::Item) -> bool + Clone + ProcessSend + 'static + 'async_trait,
Self::Item: 'static,
Self::Task: 'static,
Self: Sized + 'async_trait,
'life0: 'async_trait { ... }
fn any<'life0, 'async_trait, P, F>(
self,
pool: &'life0 P,
f: F,
) -> Pin<Box<dyn Future<Output = bool> + 'async_trait>>
where P: ProcessPool + 'async_trait,
F: FnMut(Self::Item) -> bool + Clone + ProcessSend + 'static + 'async_trait,
Self::Item: 'static,
Self::Task: 'static,
Self: Sized + 'async_trait,
'life0: 'async_trait { ... }
}