Struct fuzzcheck::mutators::boxed::BoxMutator [−][src]
pub struct BoxMutator<M> {
pub mutator: M,
}Fields
mutator: MImplementations
Trait Implementations
Returns the “default value” for a type. Read more
Accompanies each value to help compute its complexity and mutate it efficiently.
type MutationStep = M::MutationStep
type MutationStep = M::MutationStep
Contains information about what mutations have already been tried.
type ArbitraryStep = M::ArbitraryStep
type ArbitraryStep = M::ArbitraryStep
Contains information about what arbitrary values have already been generated.
type UnmutateToken = M::UnmutateToken
type UnmutateToken = M::UnmutateToken
Describes how to reverse a mutation
The first ArbitraryStep value to be passed to ordered_arbitrary
Verifies that the value conforms to the mutator’s expectations and, if it does, returns the Cache and first MutationStep associated with that value. Read more
The maximum complexity that a Value can possibly have.
The minimum complexity that a Value can possibly have.
Computes the complexity of the value. Read more
fn ordered_arbitrary(
&self,
step: &mut Self::ArbitraryStep,
max_cplx: f64
) -> Option<(Box<T>, f64)>
fn ordered_arbitrary(
&self,
step: &mut Self::ArbitraryStep,
max_cplx: f64
) -> Option<(Box<T>, f64)>
Generates an entirely new value based on the given ArbitraryStep. Read more
Generates an entirely new value.
The generated value should be smaller
than the given max_cplx. However, if that is not possible, then
it should return a value of the lowest possible complexity.
Returns the value itself and its complexity, which must be equal to
self.complexity(value, cache) Read more
fn ordered_mutate(
&self,
value: &mut Box<T>,
cache: &mut Self::Cache,
step: &mut Self::MutationStep,
max_cplx: f64
) -> Option<(Self::UnmutateToken, f64)>
fn ordered_mutate(
&self,
value: &mut Box<T>,
cache: &mut Self::Cache,
step: &mut Self::MutationStep,
max_cplx: f64
) -> Option<(Self::UnmutateToken, f64)>
Mutates a value (and optionally its cache) based on the given
MutationStep.
The mutated value should be within the given
max_cplx. Returns None if it no longer possible to mutate
the value to a new state, or if it is not possible to keep it under
max_cplx. Otherwise, return the UnmutateToken that describes how to
undo the mutation as well as the new complexity of the value. Read more
fn random_mutate(
&self,
value: &mut Box<T>,
cache: &mut Self::Cache,
max_cplx: f64
) -> (Self::UnmutateToken, f64)
fn random_mutate(
&self,
value: &mut Box<T>,
cache: &mut Self::Cache,
max_cplx: f64
) -> (Self::UnmutateToken, f64)
Mutates a value (and optionally its cache). The mutated value should be
within the given max_cplx. But if that is not possible, then it
should mutate the value so that it has a minimal complexity. Returns
the UnmutateToken that describes how to undo the mutation as well as
the new complexity of the value. Read more