pub trait MapValuesExt<K, V>: MapQuery<Key = K, Value = V>{
// Provided methods
fn map_values<U, F>(self, f: F) -> MapValuesPlan<Self, K, V, U, F>
where U: CellValue,
F: Fn(&K, &V) -> U + Send + Sync + 'static { ... }
fn filter_map_values<U, F>(
self,
f: F,
) -> FilterMapValuesPlan<Self, K, V, U, F>
where U: CellValue,
F: Fn(&K, &V) -> Option<U> + Send + Sync + 'static { ... }
}Expand description
Semantic key-preserving projection operators.
Projection closures must be deterministic, externally side-effect-free, and nonblocking. They may be invoked repeatedly or concurrently; invocation count, order, and thread are not API guarantees.
Provided Methods§
Sourcefn map_values<U, F>(self, f: F) -> MapValuesPlan<Self, K, V, U, F>
fn map_values<U, F>(self, f: F) -> MapValuesPlan<Self, K, V, U, F>
Map every value while retaining its input key.
Sourcefn filter_map_values<U, F>(self, f: F) -> FilterMapValuesPlan<Self, K, V, U, F>
fn filter_map_values<U, F>(self, f: F) -> FilterMapValuesPlan<Self, K, V, U, F>
Map or omit a value while retaining its input key.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".