Trait fuzzcheck::MutatorExt
source · [−]pub trait MutatorExt<T>: Mutator<T> + Sized where
T: Clone + 'static, {
fn filter<F>(self, filter: F) -> FilterMutator<Self, F>
where
F: Fn(&T) -> bool,
{ ... }
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
Create a mutator which wraps self
but only produces values
for which the given closure returns true
Create a mutator which wraps self
and transforms the values generated by self
using the map
closure. The second closure, parse
, should apply the opposite
transformation.