pub trait MutatorExt<T>: Mutator<T> + Sizedwhere
T: Clone + 'static,{
// Provided methods
fn filter<F>(self, filter: F) -> FilterMutator<Self, F>
where F: Fn(&T) -> bool + 'static { ... }
fn map<To, Map, Parse>(
self,
map: Map,
parse: Parse,
) -> MapMutator<T, To, Self, Parse, Map, fn(&To, f64) -> f64>
where To: Clone + 'static,
Map: Fn(&T) -> To,
Parse: Fn(&To) -> Option<T> { ... }
}Expand description
A trait for convenience methods automatically implemented for all types that conform to Mutator<V>
Provided Methods§
Sourcefn filter<F>(self, filter: F) -> FilterMutator<Self, F>
fn filter<F>(self, filter: F) -> FilterMutator<Self, F>
Create a mutator which wraps self but only produces values
for which the given closure returns true
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.