Implementations
sourceimpl<T, M> VecMutator<T, M> where
T: Clone + 'static,
M: Mutator<T>,
impl<T, M> VecMutator<T, M> where
T: Clone + 'static,
M: Mutator<T>,
pub fn new(
m: M,
len_range: RangeInclusive<usize>,
inherent_complexity: bool
) -> Self
Trait Implementations
sourceimpl<T, M> Mutation<Vec<T, Global>, VecMutator<T, M>> for Arbitrary where
T: Clone + 'static,
M: Mutator<T>,
impl<T, M> Mutation<Vec<T, Global>, VecMutator<T, M>> for Arbitrary where
T: Clone + 'static,
M: Mutator<T>,
type RandomStep = ArbitraryStep
type Step = ArbitraryStep
type Concrete<'a> = ConcreteArbitrary<T>
type Revert = RevertArbitrary<T>
fn default_random_step(
&self,
mutator: &VecMutator<T, M>,
_value: &Vec<T>
) -> Option<Self::RandomStep>
fn random<'a>(
mutator: &VecMutator<T, M>,
_value: &Vec<T>,
_cache: &<VecMutator<T, M> as Mutator<Vec<T>>>::Cache,
_random_step: &Self::RandomStep,
max_cplx: f64
) -> Self::Concrete<'a>
fn default_step(
&self,
mutator: &VecMutator<T, M>,
value: &Vec<T>,
_cache: &<VecMutator<T, M> as Mutator<Vec<T>>>::Cache
) -> Option<Self::Step>
fn from_step<'a>(
mutator: &VecMutator<T, M>,
value: &Vec<T>,
cache: &<VecMutator<T, M> as Mutator<Vec<T>>>::Cache,
step: &'a mut Self::Step,
_subvalue_provider: &dyn SubValueProvider,
max_cplx: f64
) -> Option<Self::Concrete<'a>>
fn apply<'a>(
mutation: Self::Concrete<'a>,
_mutator: &VecMutator<T, M>,
value: &mut Vec<T>,
_cache: &mut <VecMutator<T, M> as Mutator<Vec<T>>>::Cache,
_subvalue_provider: &dyn SubValueProvider,
_max_cplx: f64
) -> (Self::Revert, f64)
sourceimpl<T, M> Mutation<Vec<T, Global>, VecMutator<T, M>> for CopyElement where
T: Clone + 'static,
M: Mutator<T>,
impl<T, M> Mutation<Vec<T, Global>, VecMutator<T, M>> for CopyElement where
T: Clone + 'static,
M: Mutator<T>,
type RandomStep = CopyElementRandomStep
type Step = CopyElementStep
type Concrete<'a> = ConcreteCopyElement<T>
type Revert = RevertCopyElement
fn default_random_step(
&self,
mutator: &VecMutator<T, M>,
value: &Vec<T>
) -> Option<Self::RandomStep>
fn random<'a>(
mutator: &VecMutator<T, M>,
value: &Vec<T>,
cache: &<VecMutator<T, M> as Mutator<Vec<T>>>::Cache,
_random_step: &Self::RandomStep,
_max_cplx: f64
) -> Self::Concrete<'a>
fn default_step(
&self,
mutator: &VecMutator<T, M>,
value: &Vec<T>,
_cache: &<VecMutator<T, M> as Mutator<Vec<T>>>::Cache
) -> Option<Self::Step>
fn from_step<'a>(
mutator: &VecMutator<T, M>,
value: &Vec<T>,
cache: &<VecMutator<T, M> as Mutator<Vec<T>>>::Cache,
step: &'a mut Self::Step,
subvalue_provider: &dyn SubValueProvider,
max_cplx: f64
) -> Option<Self::Concrete<'a>>
fn apply<'a>(
mutation: Self::Concrete<'a>,
mutator: &VecMutator<T, M>,
value: &mut Vec<T>,
cache: &mut <VecMutator<T, M> as Mutator<Vec<T>>>::Cache,
_subvalue_provider: &dyn SubValueProvider,
_max_cplx: f64
) -> (Self::Revert, f64)
sourceimpl<T, M> Mutation<Vec<T, Global>, VecMutator<T, M>> for CrossoverInsertSlice where
T: Clone + 'static,
M: Mutator<T>,
impl<T, M> Mutation<Vec<T, Global>, VecMutator<T, M>> for CrossoverInsertSlice where
T: Clone + 'static,
M: Mutator<T>,
type RandomStep = !
type Step = CrossoverInsertSliceStep
type Concrete<'a> = ConcreteCrossoverInsertSlice<T>
type Revert = RevertCrossoverInsertSlice<<M as Mutator<T>>::UnmutateToken>
fn default_random_step(
&self,
_mutator: &VecMutator<T, M>,
_value: &Vec<T>
) -> Option<Self::RandomStep>
fn random<'a>(
_mutator: &VecMutator<T, M>,
_value: &Vec<T>,
_cache: &<VecMutator<T, M> as Mutator<Vec<T>>>::Cache,
_random_step: &Self::RandomStep,
_max_cplx: f64
) -> Self::Concrete<'a>
fn default_step(
&self,
mutator: &VecMutator<T, M>,
value: &Vec<T>,
_cache: &<VecMutator<T, M> as Mutator<Vec<T>>>::Cache
) -> Option<Self::Step>
fn from_step<'a>(
mutator: &VecMutator<T, M>,
value: &Vec<T>,
cache: &<VecMutator<T, M> as Mutator<Vec<T>>>::Cache,
_step: &'a mut Self::Step,
subvalue_provider: &dyn SubValueProvider,
max_cplx: f64
) -> Option<Self::Concrete<'a>>
fn apply<'a>(
mutation: Self::Concrete<'a>,
mutator: &VecMutator<T, M>,
value: &mut Vec<T>,
cache: &mut <VecMutator<T, M> as Mutator<Vec<T>>>::Cache,
_subvalue_provider: &dyn SubValueProvider,
max_cplx: f64
) -> (Self::Revert, f64)
sourceimpl<T, M> Mutation<Vec<T, Global>, VecMutator<T, M>> for CrossoverReplaceElement where
T: Clone + 'static,
M: Mutator<T>,
impl<T, M> Mutation<Vec<T, Global>, VecMutator<T, M>> for CrossoverReplaceElement where
T: Clone + 'static,
M: Mutator<T>,
type RandomStep = !
type Step = CrossoverReplaceElementStep<T>
type Concrete<'a> = ConcreteCrossoverReplaceElement<T>
type Revert = RevertCrossoverReplaceElement<T, <M as Mutator<T>>::UnmutateToken>
fn default_random_step(
&self,
_mutator: &VecMutator<T, M>,
_value: &Vec<T>
) -> Option<Self::RandomStep>
fn random<'a>(
_mutator: &VecMutator<T, M>,
_value: &Vec<T>,
_cache: &<VecMutator<T, M> as Mutator<Vec<T>>>::Cache,
_random_step: &Self::RandomStep,
_max_cplx: f64
) -> Self::Concrete<'a>
fn default_step(
&self,
mutator: &VecMutator<T, M>,
value: &Vec<T>,
_cache: &<VecMutator<T, M> as Mutator<Vec<T>>>::Cache
) -> Option<Self::Step>
fn from_step<'a>(
mutator: &VecMutator<T, M>,
value: &Vec<T>,
cache: &<VecMutator<T, M> as Mutator<Vec<T>>>::Cache,
step: &'a mut Self::Step,
subvalue_provider: &dyn SubValueProvider,
max_cplx: f64
) -> Option<Self::Concrete<'a>>
fn apply<'a>(
mutation: Self::Concrete<'a>,
mutator: &VecMutator<T, M>,
value: &mut Vec<T>,
cache: &mut <VecMutator<T, M> as Mutator<Vec<T>>>::Cache,
_subvalue_provider: &dyn SubValueProvider,
max_cplx: f64
) -> (Self::Revert, f64)
sourceimpl<T, M> Mutation<Vec<T, Global>, VecMutator<T, M>> for InsertElement where
T: Clone + 'static,
M: Mutator<T>,
impl<T, M> Mutation<Vec<T, Global>, VecMutator<T, M>> for InsertElement where
T: Clone + 'static,
M: Mutator<T>,
type RandomStep = InsertElementRandomStep
type Step = InsertElementStep<<M as Mutator<T>>::ArbitraryStep>
type Concrete<'a> = ConcreteInsertElement<T>
type Revert = RevertInsertElement
fn default_random_step(
&self,
mutator: &VecMutator<T, M>,
value: &Vec<T>
) -> Option<Self::RandomStep>
fn random<'a>(
mutator: &VecMutator<T, M>,
value: &Vec<T>,
cache: &<VecMutator<T, M> as Mutator<Vec<T>>>::Cache,
_random_step: &Self::RandomStep,
max_cplx: f64
) -> Self::Concrete<'a>
fn default_step(
&self,
mutator: &VecMutator<T, M>,
value: &Vec<T>,
_cache: &<VecMutator<T, M> as Mutator<Vec<T>>>::Cache
) -> Option<Self::Step>
fn from_step<'a>(
mutator: &VecMutator<T, M>,
value: &Vec<T>,
cache: &<VecMutator<T, M> as Mutator<Vec<T>>>::Cache,
step: &'a mut Self::Step,
subvalue_provider: &dyn SubValueProvider,
max_cplx: f64
) -> Option<Self::Concrete<'a>>
fn apply<'a>(
mutation: Self::Concrete<'a>,
mutator: &VecMutator<T, M>,
value: &mut Vec<T>,
cache: &mut <VecMutator<T, M> as Mutator<Vec<T>>>::Cache,
_subvalue_provider: &dyn SubValueProvider,
_max_cplx: f64
) -> (Self::Revert, f64)
sourceimpl<T, M> Mutation<Vec<T, Global>, VecMutator<T, M>> for InsertManyElements where
T: Clone + 'static,
M: Mutator<T>,
impl<T, M> Mutation<Vec<T, Global>, VecMutator<T, M>> for InsertManyElements where
T: Clone + 'static,
M: Mutator<T>,
type RandomStep = InsertManyElementsStep
type Step = InsertManyElementsStep
type Concrete<'a> = ConcreteInsertManyElements<T>
type Revert = RevertInsertManyElements
fn default_random_step(
&self,
mutator: &VecMutator<T, M>,
value: &Vec<T>
) -> Option<Self::RandomStep>
fn random<'a>(
mutator: &VecMutator<T, M>,
value: &Vec<T>,
cache: &<VecMutator<T, M> as Mutator<Vec<T>>>::Cache,
random_step: &Self::RandomStep,
max_cplx: f64
) -> Self::Concrete<'a>
fn default_step(
&self,
mutator: &VecMutator<T, M>,
value: &Vec<T>,
_cache: &<VecMutator<T, M> as Mutator<Vec<T>>>::Cache
) -> Option<Self::Step>
fn from_step<'a>(
mutator: &VecMutator<T, M>,
value: &Vec<T>,
cache: &<VecMutator<T, M> as Mutator<Vec<T>>>::Cache,
step: &'a mut Self::Step,
_subvalue_provider: &dyn SubValueProvider,
max_cplx: f64
) -> Option<Self::Concrete<'a>>
fn apply<'a>(
mutation: Self::Concrete<'a>,
mutator: &VecMutator<T, M>,
value: &mut Vec<T>,
cache: &mut <VecMutator<T, M> as Mutator<Vec<T>>>::Cache,
_subvalue_provider: &dyn SubValueProvider,
_max_cplx: f64
) -> (Self::Revert, f64)
sourceimpl<T, M> Mutation<Vec<T, Global>, VecMutator<T, M>> for MutateElement where
T: Clone + 'static,
M: Mutator<T>,
impl<T, M> Mutation<Vec<T, Global>, VecMutator<T, M>> for MutateElement where
T: Clone + 'static,
M: Mutator<T>,
type RandomStep = MutateElementRandomStep
type Step = MutateElementStep<<M as Mutator<T>>::MutationStep>
type Concrete<'a> = ConcreteMutateElement<'a, <M as Mutator<T>>::MutationStep>
type Revert = RevertMutateElement<<M as Mutator<T>>::UnmutateToken>
fn default_random_step(
&self,
mutator: &VecMutator<T, M>,
value: &Vec<T>
) -> Option<Self::RandomStep>
fn random<'a>(
mutator: &VecMutator<T, M>,
value: &Vec<T>,
_cache: &<VecMutator<T, M> as Mutator<Vec<T>>>::Cache,
_random_step: &Self::RandomStep,
_max_cplx: f64
) -> Self::Concrete<'a>
fn default_step(
&self,
mutator: &VecMutator<T, M>,
value: &Vec<T>,
cache: &<VecMutator<T, M> as Mutator<Vec<T>>>::Cache
) -> Option<Self::Step>
fn from_step<'a>(
mutator: &VecMutator<T, M>,
_value: &Vec<T>,
_cache: &<VecMutator<T, M> as Mutator<Vec<T>>>::Cache,
step: &'a mut Self::Step,
_subvalue_provider: &dyn SubValueProvider,
_max_cplx: f64
) -> Option<Self::Concrete<'a>>
fn apply<'a>(
mutation: Self::Concrete<'a>,
mutator: &VecMutator<T, M>,
value: &mut Vec<T>,
cache: &mut <VecMutator<T, M> as Mutator<Vec<T>>>::Cache,
subvalue_provider: &dyn SubValueProvider,
max_cplx: f64
) -> (Self::Revert, f64)
sourceimpl<T, M> Mutation<Vec<T, Global>, VecMutator<T, M>> for OnlyChooseLength where
T: Clone + 'static,
M: Mutator<T>,
impl<T, M> Mutation<Vec<T, Global>, VecMutator<T, M>> for OnlyChooseLength where
T: Clone + 'static,
M: Mutator<T>,
type RandomStep = OnlyChooseLengthRandomStep
type Step = OnlyChooseLengthStep
type Concrete<'a> = ConcreteOnlyChooseLength
type Revert = RevertOnlyChooseLength<T>
fn default_random_step(
&self,
mutator: &VecMutator<T, M>,
_value: &Vec<T>
) -> Option<Self::RandomStep>
fn random<'a>(
mutator: &VecMutator<T, M>,
_value: &Vec<T>,
_cache: &<VecMutator<T, M> as Mutator<Vec<T>>>::Cache,
_random_step: &Self::RandomStep,
max_cplx: f64
) -> Self::Concrete<'a>
fn default_step(
&self,
mutator: &VecMutator<T, M>,
_value: &Vec<T>,
_cache: &<VecMutator<T, M> as Mutator<Vec<T>>>::Cache
) -> Option<Self::Step>
fn from_step<'a>(
mutator: &VecMutator<T, M>,
_value: &Vec<T>,
_cache: &<VecMutator<T, M> as Mutator<Vec<T>>>::Cache,
step: &'a mut Self::Step,
_subvalue_provider: &dyn SubValueProvider,
max_cplx: f64
) -> Option<Self::Concrete<'a>>
fn apply<'a>(
mutation: Self::Concrete<'a>,
mutator: &VecMutator<T, M>,
value: &mut Vec<T>,
_cache: &mut <VecMutator<T, M> as Mutator<Vec<T>>>::Cache,
_subvalue_provider: &dyn SubValueProvider,
_max_cplx: f64
) -> (Self::Revert, f64)
sourceimpl<T, M> Mutation<Vec<T, Global>, VecMutator<T, M>> for Remove where
T: Clone + 'static,
M: Mutator<T>,
impl<T, M> Mutation<Vec<T, Global>, VecMutator<T, M>> for Remove where
T: Clone + 'static,
M: Mutator<T>,
type RandomStep = RemoveStep
type Step = RemoveStep
type Concrete<'a> = ConcreteRemove
type Revert = RevertRemove<T>
fn default_random_step(
&self,
mutator: &VecMutator<T, M>,
value: &Vec<T>
) -> Option<Self::RandomStep>
fn random<'a>(
_mutator: &VecMutator<T, M>,
_value: &Vec<T>,
_cache: &<VecMutator<T, M> as Mutator<Vec<T>>>::Cache,
random_step: &Self::RandomStep,
_max_cplx: f64
) -> Self::Concrete<'a>
fn default_step(
&self,
mutator: &VecMutator<T, M>,
value: &Vec<T>,
_cache: &<VecMutator<T, M> as Mutator<Vec<T>>>::Cache
) -> Option<Self::Step>
fn from_step<'a>(
_mutator: &VecMutator<T, M>,
value: &Vec<T>,
_cache: &<VecMutator<T, M> as Mutator<Vec<T>>>::Cache,
step: &'a mut Self::Step,
_subvalue_provider: &dyn SubValueProvider,
_max_cplx: f64
) -> Option<Self::Concrete<'a>>
fn apply<'a>(
mutation: Self::Concrete<'a>,
mutator: &VecMutator<T, M>,
value: &mut Vec<T>,
cache: &mut <VecMutator<T, M> as Mutator<Vec<T>>>::Cache,
_subvalue_provider: &dyn SubValueProvider,
_max_cplx: f64
) -> (Self::Revert, f64)
sourceimpl<T, M> Mutation<Vec<T, Global>, VecMutator<T, M>> for RemoveAndInsertElement where
T: Clone + 'static,
M: Mutator<T>,
impl<T, M> Mutation<Vec<T, Global>, VecMutator<T, M>> for RemoveAndInsertElement where
T: Clone + 'static,
M: Mutator<T>,
type RandomStep = RemoveAndInsertElementRandomStep
type Step = RemoveAndInsertElementRandomStep
type Concrete<'a> = ConcreteRemoveAndInsertElement<T>
type Revert = RevertRemoveAndInsertElement<T>
fn default_random_step(
&self,
mutator: &VecMutator<T, M>,
value: &Vec<T>
) -> Option<Self::RandomStep>
fn random<'a>(
mutator: &VecMutator<T, M>,
value: &Vec<T>,
cache: &<VecMutator<T, M> as Mutator<Vec<T>>>::Cache,
_random_step: &Self::RandomStep,
max_cplx: f64
) -> Self::Concrete<'a>
fn default_step(
&self,
mutator: &VecMutator<T, M>,
value: &Vec<T>,
_cache: &<VecMutator<T, M> as Mutator<Vec<T>>>::Cache
) -> Option<Self::Step>
fn from_step<'a>(
mutator: &VecMutator<T, M>,
value: &Vec<T>,
cache: &<VecMutator<T, M> as Mutator<Vec<T>>>::Cache,
step: &'a mut Self::Step,
_subvalue_provider: &dyn SubValueProvider,
max_cplx: f64
) -> Option<Self::Concrete<'a>>
fn apply<'a>(
mutation: Self::Concrete<'a>,
_mutator: &VecMutator<T, M>,
value: &mut Vec<T>,
_cache: &mut <VecMutator<T, M> as Mutator<Vec<T>>>::Cache,
_subvalue_provider: &dyn SubValueProvider,
_max_cplx: f64
) -> (Self::Revert, f64)
sourceimpl<T, M> Mutation<Vec<T, Global>, VecMutator<T, M>> for SwapElements where
T: Clone + 'static,
M: Mutator<T>,
impl<T, M> Mutation<Vec<T, Global>, VecMutator<T, M>> for SwapElements where
T: Clone + 'static,
M: Mutator<T>,
type RandomStep = SwapElementsStep
type Step = SwapElementsStep
type Concrete<'a> = ConcreteSwapElements
type Revert = RevertSwapElements
fn default_random_step(
&self,
mutator: &VecMutator<T, M>,
value: &Vec<T>
) -> Option<Self::RandomStep>
fn random<'a>(
_mutator: &VecMutator<T, M>,
_value: &Vec<T>,
_cache: &<VecMutator<T, M> as Mutator<Vec<T>>>::Cache,
random_step: &Self::RandomStep,
_max_cplx: f64
) -> Self::Concrete<'a>
fn default_step(
&self,
mutator: &VecMutator<T, M>,
value: &Vec<T>,
_cache: &<VecMutator<T, M> as Mutator<Vec<T>>>::Cache
) -> Option<Self::Step>
fn from_step<'a>(
_mutator: &VecMutator<T, M>,
value: &Vec<T>,
_cache: &<VecMutator<T, M> as Mutator<Vec<T>>>::Cache,
step: &'a mut Self::Step,
_subvalue_provider: &dyn SubValueProvider,
_max_cplx: f64
) -> Option<Self::Concrete<'a>>
fn apply<'a>(
mutation: Self::Concrete<'a>,
mutator: &VecMutator<T, M>,
value: &mut Vec<T>,
cache: &mut <VecMutator<T, M> as Mutator<Vec<T>>>::Cache,
_subvalue_provider: &dyn SubValueProvider,
_max_cplx: f64
) -> (Self::Revert, f64)
sourceimpl<T, M> Mutation<Vec<T, Global>, VecMutator<T, M>> for VectorMutation where
T: Clone + 'static,
M: Mutator<T>,
impl<T, M> Mutation<Vec<T, Global>, VecMutator<T, M>> for VectorMutation where
T: Clone + 'static,
M: Mutator<T>,
type RandomStep = VectorMutationRandomStep<T, M>
type Step = VectorMutationStep<T, M>
type Concrete<'a> = ConcreteVectorMutation<'a, T, M>
type Revert = RevertVectorMutation<T, M>
fn default_random_step(
&self,
mutator: &VecMutator<T, M>,
value: &Vec<T>
) -> Option<Self::RandomStep>
fn random<'a>(
mutator: &VecMutator<T, M>,
value: &Vec<T>,
cache: &<VecMutator<T, M> as Mutator<Vec<T>>>::Cache,
step: &Self::RandomStep,
max_cplx: f64
) -> Self::Concrete<'a>
fn default_step(
&self,
mutator: &VecMutator<T, M>,
value: &Vec<T>,
cache: &<VecMutator<T, M> as Mutator<Vec<T>>>::Cache
) -> Option<Self::Step>
fn from_step<'a>(
mutator: &VecMutator<T, M>,
value: &Vec<T>,
cache: &<VecMutator<T, M> as Mutator<Vec<T>>>::Cache,
step: &'a mut Self::Step,
subvalue_provider: &dyn SubValueProvider,
max_cplx: f64
) -> Option<Self::Concrete<'a>>
fn apply<'a>(
mutation: Self::Concrete<'a>,
mutator: &VecMutator<T, M>,
value: &mut Vec<T>,
cache: &mut <VecMutator<T, M> as Mutator<Vec<T>>>::Cache,
subvalue_provider: &dyn SubValueProvider,
max_cplx: f64
) -> (Self::Revert, f64)
sourceimpl<T, M> Mutator<Vec<T, Global>> for VecMutator<T, M> where
T: Clone + 'static,
M: Mutator<T>,
impl<T, M> Mutator<Vec<T, Global>> for VecMutator<T, M> where
T: Clone + 'static,
M: Mutator<T>,
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
sourceimpl<T, M> RevertMutation<Vec<T, Global>, VecMutator<T, M>> for RevertArbitrary<T> where
T: Clone + 'static,
M: Mutator<T>,
impl<T, M> RevertMutation<Vec<T, Global>, VecMutator<T, M>> for RevertArbitrary<T> where
T: Clone + 'static,
M: Mutator<T>,
fn revert(
self,
_mutator: &VecMutator<T, M>,
value: &mut Vec<T>,
_cache: &mut <VecMutator<T, M> as Mutator<Vec<T>>>::Cache
)
sourceimpl<T, M> RevertMutation<Vec<T, Global>, VecMutator<T, M>> for RevertCopyElement where
T: Clone + 'static,
M: Mutator<T>,
impl<T, M> RevertMutation<Vec<T, Global>, VecMutator<T, M>> for RevertCopyElement where
T: Clone + 'static,
M: Mutator<T>,
fn revert(
self,
_mutator: &VecMutator<T, M>,
value: &mut Vec<T>,
_cache: &mut <VecMutator<T, M> as Mutator<Vec<T>>>::Cache
)
sourceimpl<T, M> RevertMutation<Vec<T, Global>, VecMutator<T, M>> for RevertCrossoverInsertSlice<M::UnmutateToken> where
T: Clone + 'static,
M: Mutator<T>,
impl<T, M> RevertMutation<Vec<T, Global>, VecMutator<T, M>> for RevertCrossoverInsertSlice<M::UnmutateToken> where
T: Clone + 'static,
M: Mutator<T>,
fn revert(
self,
mutator: &VecMutator<T, M>,
value: &mut Vec<T>,
cache: &mut <VecMutator<T, M> as Mutator<Vec<T>>>::Cache
)
sourceimpl<T, M> RevertMutation<Vec<T, Global>, VecMutator<T, M>> for RevertCrossoverReplaceElement<T, M::UnmutateToken> where
T: Clone + 'static,
M: Mutator<T>,
impl<T, M> RevertMutation<Vec<T, Global>, VecMutator<T, M>> for RevertCrossoverReplaceElement<T, M::UnmutateToken> where
T: Clone + 'static,
M: Mutator<T>,
fn revert(
self,
mutator: &VecMutator<T, M>,
value: &mut Vec<T>,
cache: &mut <VecMutator<T, M> as Mutator<Vec<T>>>::Cache
)
sourceimpl<T, M> RevertMutation<Vec<T, Global>, VecMutator<T, M>> for RevertInsertElement where
T: Clone + 'static,
M: Mutator<T>,
impl<T, M> RevertMutation<Vec<T, Global>, VecMutator<T, M>> for RevertInsertElement where
T: Clone + 'static,
M: Mutator<T>,
fn revert(
self,
_mutator: &VecMutator<T, M>,
value: &mut Vec<T>,
_cache: &mut <VecMutator<T, M> as Mutator<Vec<T>>>::Cache
)
sourceimpl<T, M> RevertMutation<Vec<T, Global>, VecMutator<T, M>> for RevertInsertManyElements where
T: Clone + 'static,
M: Mutator<T>,
impl<T, M> RevertMutation<Vec<T, Global>, VecMutator<T, M>> for RevertInsertManyElements where
T: Clone + 'static,
M: Mutator<T>,
fn revert(
self,
_mutator: &VecMutator<T, M>,
value: &mut Vec<T>,
_cache: &mut <VecMutator<T, M> as Mutator<Vec<T>>>::Cache
)
sourceimpl<T, M> RevertMutation<Vec<T, Global>, VecMutator<T, M>> for RevertMutateElement<M::UnmutateToken> where
T: Clone + 'static,
M: Mutator<T>,
impl<T, M> RevertMutation<Vec<T, Global>, VecMutator<T, M>> for RevertMutateElement<M::UnmutateToken> where
T: Clone + 'static,
M: Mutator<T>,
fn revert(
self,
mutator: &VecMutator<T, M>,
value: &mut Vec<T>,
cache: &mut <VecMutator<T, M> as Mutator<Vec<T>>>::Cache
)
sourceimpl<T, M> RevertMutation<Vec<T, Global>, VecMutator<T, M>> for RevertOnlyChooseLength<T> where
T: Clone + 'static,
M: Mutator<T>,
impl<T, M> RevertMutation<Vec<T, Global>, VecMutator<T, M>> for RevertOnlyChooseLength<T> where
T: Clone + 'static,
M: Mutator<T>,
fn revert(
self,
_mutator: &VecMutator<T, M>,
value: &mut Vec<T>,
_cache: &mut <VecMutator<T, M> as Mutator<Vec<T>>>::Cache
)
sourceimpl<T, M> RevertMutation<Vec<T, Global>, VecMutator<T, M>> for RevertRemove<T> where
T: Clone + 'static,
M: Mutator<T>,
impl<T, M> RevertMutation<Vec<T, Global>, VecMutator<T, M>> for RevertRemove<T> where
T: Clone + 'static,
M: Mutator<T>,
fn revert(
self,
_mutator: &VecMutator<T, M>,
value: &mut Vec<T>,
_cache: &mut <VecMutator<T, M> as Mutator<Vec<T>>>::Cache
)
sourceimpl<T, M> RevertMutation<Vec<T, Global>, VecMutator<T, M>> for RevertRemoveAndInsertElement<T> where
T: Clone + 'static,
M: Mutator<T>,
impl<T, M> RevertMutation<Vec<T, Global>, VecMutator<T, M>> for RevertRemoveAndInsertElement<T> where
T: Clone + 'static,
M: Mutator<T>,
fn revert(
self,
_mutator: &VecMutator<T, M>,
value: &mut Vec<T>,
_cache: &mut <VecMutator<T, M> as Mutator<Vec<T>>>::Cache
)
sourceimpl<T, M> RevertMutation<Vec<T, Global>, VecMutator<T, M>> for RevertSwapElements where
T: Clone + 'static,
M: Mutator<T>,
impl<T, M> RevertMutation<Vec<T, Global>, VecMutator<T, M>> for RevertSwapElements where
T: Clone + 'static,
M: Mutator<T>,
fn revert(
self,
_mutator: &VecMutator<T, M>,
value: &mut Vec<T>,
_cache: &mut <VecMutator<T, M> as Mutator<Vec<T>>>::Cache
)
sourceimpl<T, M> RevertMutation<Vec<T, Global>, VecMutator<T, M>> for RevertVectorMutation<T, M> where
T: Clone + 'static,
M: Mutator<T>,
impl<T, M> RevertMutation<Vec<T, Global>, VecMutator<T, M>> for RevertVectorMutation<T, M> where
T: Clone + 'static,
M: Mutator<T>,
fn revert(
self,
mutator: &VecMutator<T, M>,
value: &mut Vec<T>,
cache: &mut <VecMutator<T, M> as Mutator<Vec<T>>>::Cache
)
Auto Trait Implementations
impl<T, M> !RefUnwindSafe for VecMutator<T, M>
impl<T, M> Send for VecMutator<T, M> where
M: Send,
T: Send,
impl<T, M> !Sync for VecMutator<T, M>
impl<T, M> Unpin for VecMutator<T, M> where
M: Unpin,
T: Unpin,
impl<T, M> UnwindSafe for VecMutator<T, M> where
M: UnwindSafe,
T: UnwindSafe,
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