pub struct U16Mutator { /* private fields */ }
Trait Implementations
sourceimpl Clone for U16Mutator
impl Clone for U16Mutator
sourcefn clone(&self) -> U16Mutator
fn clone(&self) -> U16Mutator
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Default for U16Mutator
impl Default for U16Mutator
sourceimpl Mutator<u16> for U16Mutator
impl Mutator<u16> for U16Mutator
type MutationStep: Clone
type MutationStep: Clone
Contains information about what mutations have already been tried.
type ArbitraryStep: Clone
type ArbitraryStep: Clone
Contains information about what arbitrary values have already been generated.
type UnmutateToken
type UnmutateToken
Describes how to reverse a mutation
sourcefn default_arbitrary_step(&self) -> Self::ArbitraryStep
fn default_arbitrary_step(&self) -> Self::ArbitraryStep
The first ArbitraryStep
value to be passed to ordered_arbitrary
sourcefn is_valid(&self, value: &Value) -> bool
fn is_valid(&self, value: &Value) -> bool
Quickly verifies that the value conforms to the mutator’s expectations
sourcefn validate_value(&self, value: &Value) -> Option<Self::Cache>
fn validate_value(&self, value: &Value) -> Option<Self::Cache>
sourcefn default_mutation_step(
&self,
value: &Value,
cache: &Self::Cache
) -> Self::MutationStep
fn default_mutation_step(
&self,
value: &Value,
cache: &Self::Cache
) -> Self::MutationStep
Returns the first MutationStep
associated with the value
and cache. Read more
sourcefn global_search_space_complexity(&self) -> f64
fn global_search_space_complexity(&self) -> f64
The log2 of the number of values that can be produced by this mutator, or an approximation of this number (e.g. the number of bits that are needed to identify each possible value). Read more
sourcefn max_complexity(&self) -> f64
fn max_complexity(&self) -> f64
The maximum complexity that a value can possibly have.
sourcefn min_complexity(&self) -> f64
fn min_complexity(&self) -> f64
The minimum complexity that a value can possibly have.
sourcefn complexity(&self, value: &Value, cache: &Self::Cache) -> f64
fn complexity(&self, value: &Value, cache: &Self::Cache) -> f64
Computes the complexity of the value. Read more
sourcefn ordered_arbitrary(
&self,
step: &mut Self::ArbitraryStep,
max_cplx: f64
) -> Option<(Value, f64)>
fn ordered_arbitrary(
&self,
step: &mut Self::ArbitraryStep,
max_cplx: f64
) -> Option<(Value, f64)>
Generates an entirely new value based on the given ArbitraryStep
. Read more
sourcefn random_arbitrary(&self, max_cplx: f64) -> (Value, f64)
fn random_arbitrary(&self, max_cplx: f64) -> (Value, f64)
Generates an entirely new value. Read more
sourcefn ordered_mutate(
&self,
value: &mut Value,
cache: &mut Self::Cache,
step: &mut Self::MutationStep,
subvalue_provider: &dyn SubValueProvider,
max_cplx: f64
) -> Option<(Self::UnmutateToken, f64)>
fn ordered_mutate(
&self,
value: &mut Value,
cache: &mut Self::Cache,
step: &mut Self::MutationStep,
subvalue_provider: &dyn SubValueProvider,
max_cplx: f64
) -> Option<(Self::UnmutateToken, f64)>
Mutates a value (and optionally its cache) based on the given
MutationStep
. Read more
sourcefn random_mutate(
&self,
value: &mut Value,
cache: &mut Self::Cache,
max_cplx: f64
) -> (Self::UnmutateToken, f64)
fn random_mutate(
&self,
value: &mut Value,
cache: &mut Self::Cache,
max_cplx: f64
) -> (Self::UnmutateToken, f64)
Mutates a value (and optionally its cache). Read more
sourcefn unmutate(
&self,
value: &mut Value,
cache: &mut Self::Cache,
t: Self::UnmutateToken
)
fn unmutate(
&self,
value: &mut Value,
cache: &mut Self::Cache,
t: Self::UnmutateToken
)
Undoes a mutation performed on the given value and cache, described by
the given UnmutateToken
. Read more
Auto Trait Implementations
impl !RefUnwindSafe for U16Mutator
impl Send for U16Mutator
impl !Sync for U16Mutator
impl Unpin for U16Mutator
impl UnwindSafe for U16Mutator
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T, M> MutatorExt<T> for M where
M: Mutator<T>,
T: 'static + Clone,
impl<T, M> MutatorExt<T> for M where
M: Mutator<T>,
T: 'static + Clone,
sourcefn filter<F>(self, filter: F) -> FilterMutator<Self, F> where
F: Fn(&T) -> bool,
fn filter<F>(self, filter: F) -> FilterMutator<Self, F> where
F: Fn(&T) -> bool,
Create a mutator which wraps self
but only produces values
for which the given closure returns true
Read more
sourcefn 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>,
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>,
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. Read more