[−][src]Struct actyxos_data_flow::flow::Grouped
An arrangement of a collection by key
The collection is partitioned by key and stored in-memory so that it can be manipulated
Implementations
impl<'a, K, V> Grouped<'a, K, V> where
K: ExchangeData + Hashable,
V: ExchangeData,
[src]
K: ExchangeData + Hashable,
V: ExchangeData,
pub fn join<V2, L, D, I>(
&self,
other: &Grouped<'a, K, V2>,
f: L
) -> Flow<'a, D, Stateful> where
V2: ExchangeData,
D: ExchangeData,
I: IntoIterator<Item = D>,
L: FnMut(&K, &V, &V2) -> I + 'static,
[src]
&self,
other: &Grouped<'a, K, V2>,
f: L
) -> Flow<'a, D, Stateful> where
V2: ExchangeData,
D: ExchangeData,
I: IntoIterator<Item = D>,
L: FnMut(&K, &V, &V2) -> I + 'static,
Join this collection with another that uses the same key, combining values with the given 1:many function
pub fn join_single<V2, L, D>(
&self,
other: &Grouped<'a, K, V2>,
f: L
) -> Flow<'a, D, Stateful> where
V2: ExchangeData,
D: ExchangeData,
L: FnMut(&K, &V, &V2) -> D + 'static,
[src]
&self,
other: &Grouped<'a, K, V2>,
f: L
) -> Flow<'a, D, Stateful> where
V2: ExchangeData,
D: ExchangeData,
L: FnMut(&K, &V, &V2) -> D + 'static,
Join this collection with another that uses the same key, combining values with the given 1:1 function
pub fn reduce<V2, L>(&self, f: L) -> Grouped<'a, K, V2> where
V2: ExchangeData,
L: FnMut(&K, &[(&V, isize)], &mut Vec<(V2, isize)>) + 'static,
[src]
V2: ExchangeData,
L: FnMut(&K, &[(&V, isize)], &mut Vec<(V2, isize)>) + 'static,
Reduce each per-key collection to a vector of output values
pub fn threshold(&self, f: impl FnMut(&K, &V, isize) -> isize + 'static) -> Self
[src]
Transform the multiplicity of each collection element
pub fn distinct(&self) -> Self
[src]
Set the multiplicity of each collection element to 1
pub fn count(&self) -> Grouped<'a, K, isize>
[src]
Count the number of elements per key
pub fn min(&self) -> Self
[src]
Compute the minimum element per key
pub fn max(&self) -> Self
[src]
Compute the maximum element per key
pub fn max_by<T, F>(&self, f: F) -> Self where
F: Fn(&V) -> T + 'static + Clone,
T: Ord,
[src]
F: Fn(&V) -> T + 'static + Clone,
T: Ord,
Compute the maximum element per key, sorting by the result of applying the given function to each value
pub fn ungroup(&self) -> Flow<'a, V, Stateful>
[src]
Ungroup by discarding the key
pub fn ungroup_with<T: ExchangeData>(
&self,
f: impl FnMut(&K, &V) -> T + 'static
) -> Flow<'a, T, Stateful>
[src]
&self,
f: impl FnMut(&K, &V) -> T + 'static
) -> Flow<'a, T, Stateful>
Ungroup by computing the new element from key and value
pub fn ungroup_both(&self) -> Flow<'a, (K, V), Stateful>
[src]
Ungroup to a collection of key-value pairs
pub fn regroup<K2, V2, L>(&self, f: L) -> Grouped<'a, K2, V2> where
K2: ExchangeData + Hashable,
V2: ExchangeData,
L: FnMut(&K, &V) -> (K2, V2) + 'static,
[src]
K2: ExchangeData + Hashable,
V2: ExchangeData,
L: FnMut(&K, &V) -> (K2, V2) + 'static,
Rearrange this collection by a different key
Auto Trait Implementations
impl<'a, K, V> !RefUnwindSafe for Grouped<'a, K, V>
impl<'a, K, V> !Send for Grouped<'a, K, V>
impl<'a, K, V> !Sync for Grouped<'a, K, V>
impl<'a, K, V> Unpin for Grouped<'a, K, V> where
K: Unpin,
V: Unpin,
K: Unpin,
V: Unpin,
impl<'a, K, V> !UnwindSafe for Grouped<'a, K, V>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<Src, Dst> LosslessTryInto<Dst> for Src where
Dst: LosslessTryFrom<Src>,
[src]
Dst: LosslessTryFrom<Src>,
fn lossless_try_into(self) -> Option<Dst>
[src]
impl<Src, Dst> LossyInto<Dst> for Src where
Dst: LossyFrom<Src>,
[src]
Dst: LossyFrom<Src>,
fn lossy_into(self) -> Dst
[src]
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,