pub enum Collector {
Show 14 variants
Count {
distinct: Option<bool>,
map: Option<WasmFunction>,
},
Sum {
map: WasmFunction,
},
Average {
map: WasmFunction,
},
Min {
map: WasmFunction,
comparator: WasmFunction,
},
Max {
map: WasmFunction,
comparator: WasmFunction,
},
ToList {
map: Option<WasmFunction>,
},
ToSet {
map: Option<WasmFunction>,
},
Compose {
collectors: Vec<Collector>,
combiner: WasmFunction,
},
Conditionally {
predicate: WasmFunction,
collector: Box<Collector>,
},
CollectAndThen {
collector: Box<Collector>,
mapper: WasmFunction,
},
LoadBalance {
map: WasmFunction,
load: Option<WasmFunction>,
},
ToSortedSet {
map: Option<WasmFunction>,
comparator: Option<WasmFunction>,
},
ToMap {
key_mapper: WasmFunction,
value_mapper: WasmFunction,
merge_function: Option<WasmFunction>,
},
ToSortedMap {
key_mapper: WasmFunction,
value_mapper: WasmFunction,
merge_function: Option<WasmFunction>,
},
}Variants§
Count
Sum
Fields
§
map: WasmFunctionAverage
Fields
§
map: WasmFunctionMin
Max
ToList
Fields
§
map: Option<WasmFunction>ToSet
Fields
§
map: Option<WasmFunction>Compose
Conditionally
CollectAndThen
LoadBalance
ToSortedSet
ToMap
ToSortedMap
Implementations§
Source§impl Collector
impl Collector
pub fn count() -> Self
pub fn count_distinct() -> Self
pub fn count_with_map(map: WasmFunction) -> Self
pub fn sum(map: WasmFunction) -> Self
pub fn average(map: WasmFunction) -> Self
pub fn min(map: WasmFunction, comparator: WasmFunction) -> Self
pub fn max(map: WasmFunction, comparator: WasmFunction) -> Self
pub fn to_list() -> Self
pub fn to_list_with_map(map: WasmFunction) -> Self
pub fn to_set() -> Self
pub fn to_set_with_map(map: WasmFunction) -> Self
pub fn compose(collectors: Vec<Collector>, combiner: WasmFunction) -> Self
pub fn conditionally(predicate: WasmFunction, collector: Collector) -> Self
pub fn collect_and_then(collector: Collector, mapper: WasmFunction) -> Self
pub fn load_balance(map: WasmFunction) -> Self
pub fn load_balance_with_load(map: WasmFunction, load: WasmFunction) -> Self
Sourcepub fn to_sorted_set() -> Self
pub fn to_sorted_set() -> Self
Create a toSortedSet collector with natural ordering.
Sourcepub fn to_sorted_set_with_map(map: WasmFunction) -> Self
pub fn to_sorted_set_with_map(map: WasmFunction) -> Self
Create a toSortedSet collector with a mapper function.
Sourcepub fn to_sorted_set_with_comparator(comparator: WasmFunction) -> Self
pub fn to_sorted_set_with_comparator(comparator: WasmFunction) -> Self
Create a toSortedSet collector with a custom comparator.
Sourcepub fn to_sorted_set_with_map_and_comparator(
map: WasmFunction,
comparator: WasmFunction,
) -> Self
pub fn to_sorted_set_with_map_and_comparator( map: WasmFunction, comparator: WasmFunction, ) -> Self
Create a toSortedSet collector with a mapper and comparator.
Sourcepub fn to_map(key_mapper: WasmFunction, value_mapper: WasmFunction) -> Self
pub fn to_map(key_mapper: WasmFunction, value_mapper: WasmFunction) -> Self
Create a toMap collector that groups values into sets by key.
Sourcepub fn to_map_with_merge(
key_mapper: WasmFunction,
value_mapper: WasmFunction,
merge_function: WasmFunction,
) -> Self
pub fn to_map_with_merge( key_mapper: WasmFunction, value_mapper: WasmFunction, merge_function: WasmFunction, ) -> Self
Create a toMap collector with a merge function for duplicate keys.
Sourcepub fn to_sorted_map(
key_mapper: WasmFunction,
value_mapper: WasmFunction,
) -> Self
pub fn to_sorted_map( key_mapper: WasmFunction, value_mapper: WasmFunction, ) -> Self
Create a toSortedMap collector that groups values by key with sorted keys.
Sourcepub fn to_sorted_map_with_merge(
key_mapper: WasmFunction,
value_mapper: WasmFunction,
merge_function: WasmFunction,
) -> Self
pub fn to_sorted_map_with_merge( key_mapper: WasmFunction, value_mapper: WasmFunction, merge_function: WasmFunction, ) -> Self
Create a toSortedMap collector with a merge function for duplicate keys.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Collector
impl<'de> Deserialize<'de> for Collector
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Collector
impl StructuralPartialEq for Collector
Auto Trait Implementations§
impl Freeze for Collector
impl RefUnwindSafe for Collector
impl Send for Collector
impl Sync for Collector
impl Unpin for Collector
impl UnwindSafe for Collector
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.