pub trait TupleMutator<T, TupleKind>: Sized + 'static where
TupleKind: RefTypes,
T: TupleStructure<TupleKind>, {
type Cache: Clone;
type MutationStep: Clone;
type ArbitraryStep: Clone;
type UnmutateToken;
Show 14 methods
fn default_arbitrary_step(&self) -> Self::ArbitraryStep;
fn complexity<'a>(
&self,
value: TupleKind::Ref<'a>,
cache: &'a Self::Cache
) -> f64;
fn is_valid<'a>(&self, value: TupleKind::Ref<'a>) -> bool;
fn validate_value<'a>(
&self,
value: TupleKind::Ref<'a>
) -> Option<Self::Cache>;
fn default_mutation_step<'a>(
&self,
value: TupleKind::Ref<'a>,
cache: &'a Self::Cache
) -> Self::MutationStep;
fn global_search_space_complexity(&self) -> f64;
fn max_complexity(&self) -> f64;
fn min_complexity(&self) -> f64;
fn ordered_arbitrary(
&self,
step: &mut Self::ArbitraryStep,
max_cplx: f64
) -> Option<(T, f64)>;
fn random_arbitrary(&self, max_cplx: f64) -> (T, f64);
fn ordered_mutate<'a>(
&self,
value: TupleKind::Mut<'a>,
cache: &'a mut Self::Cache,
step: &'a mut Self::MutationStep,
subvalue_provider: &dyn SubValueProvider,
max_cplx: f64
) -> Option<(Self::UnmutateToken, f64)>;
fn random_mutate<'a>(
&self,
value: TupleKind::Mut<'a>,
cache: &'a mut Self::Cache,
max_cplx: f64
) -> (Self::UnmutateToken, f64);
fn unmutate<'a>(
&self,
value: TupleKind::Mut<'a>,
cache: &'a mut Self::Cache,
t: Self::UnmutateToken
);
fn visit_subvalues<'a>(
&self,
value: TupleKind::Ref<'a>,
cache: &'a Self::Cache,
visit: &mut dyn FnMut(&'a dyn Any, f64)
);
}
Expand description
A trait equivalent in every way to Mutator
except that it operates
on the destructured form of types implementing TupleStructure
.
Defer to the documentation of Mutator
to understand the purpose of each method.
sourceimpl<T, T0, T1, T2, T3, M0, M1, M2, M3> TupleMutator<T, Tuple4<T0, T1, T2, T3>> for Tuple4Mutator<M0, M1, M2, M3> where
T: Clone + 'static,
T0: Clone + 'static,
M0: Mutator<T0>,
T1: Clone + 'static,
M1: Mutator<T1>,
T2: Clone + 'static,
M2: Mutator<T2>,
T3: Clone + 'static,
M3: Mutator<T3>,
T: TupleStructure<Tuple4<T0, T1, T2, T3>>,
sourceimpl<T, T0, T1, T2, T3, T4, M0, M1, M2, M3, M4> TupleMutator<T, Tuple5<T0, T1, T2, T3, T4>> for Tuple5Mutator<M0, M1, M2, M3, M4> where
T: Clone + 'static,
T0: Clone + 'static,
M0: Mutator<T0>,
T1: Clone + 'static,
M1: Mutator<T1>,
T2: Clone + 'static,
M2: Mutator<T2>,
T3: Clone + 'static,
M3: Mutator<T3>,
T4: Clone + 'static,
M4: Mutator<T4>,
T: TupleStructure<Tuple5<T0, T1, T2, T3, T4>>,
sourceimpl<T, T0, T1, T2, T3, T4, T5, M0, M1, M2, M3, M4, M5> TupleMutator<T, Tuple6<T0, T1, T2, T3, T4, T5>> for Tuple6Mutator<M0, M1, M2, M3, M4, M5> where
T: Clone + 'static,
T0: Clone + 'static,
M0: Mutator<T0>,
T1: Clone + 'static,
M1: Mutator<T1>,
T2: Clone + 'static,
M2: Mutator<T2>,
T3: Clone + 'static,
M3: Mutator<T3>,
T4: Clone + 'static,
M4: Mutator<T4>,
T5: Clone + 'static,
M5: Mutator<T5>,
T: TupleStructure<Tuple6<T0, T1, T2, T3, T4, T5>>,
sourceimpl<T, T0, T1, T2, T3, T4, T5, T6, M0, M1, M2, M3, M4, M5, M6> TupleMutator<T, Tuple7<T0, T1, T2, T3, T4, T5, T6>> for Tuple7Mutator<M0, M1, M2, M3, M4, M5, M6> where
T: Clone + 'static,
T0: Clone + 'static,
M0: Mutator<T0>,
T1: Clone + 'static,
M1: Mutator<T1>,
T2: Clone + 'static,
M2: Mutator<T2>,
T3: Clone + 'static,
M3: Mutator<T3>,
T4: Clone + 'static,
M4: Mutator<T4>,
T5: Clone + 'static,
M5: Mutator<T5>,
T6: Clone + 'static,
M6: Mutator<T6>,
T: TupleStructure<Tuple7<T0, T1, T2, T3, T4, T5, T6>>,
sourceimpl<T, T0, T1, T2, T3, T4, T5, T6, T7, M0, M1, M2, M3, M4, M5, M6, M7> TupleMutator<T, Tuple8<T0, T1, T2, T3, T4, T5, T6, T7>> for Tuple8Mutator<M0, M1, M2, M3, M4, M5, M6, M7> where
T: Clone + 'static,
T0: Clone + 'static,
M0: Mutator<T0>,
T1: Clone + 'static,
M1: Mutator<T1>,
T2: Clone + 'static,
M2: Mutator<T2>,
T3: Clone + 'static,
M3: Mutator<T3>,
T4: Clone + 'static,
M4: Mutator<T4>,
T5: Clone + 'static,
M5: Mutator<T5>,
T6: Clone + 'static,
M6: Mutator<T6>,
T7: Clone + 'static,
M7: Mutator<T7>,
T: TupleStructure<Tuple8<T0, T1, T2, T3, T4, T5, T6, T7>>,
sourceimpl<T, T0, T1, T2, T3, T4, T5, T6, T7, T8, M0, M1, M2, M3, M4, M5, M6, M7, M8> TupleMutator<T, Tuple9<T0, T1, T2, T3, T4, T5, T6, T7, T8>> for Tuple9Mutator<M0, M1, M2, M3, M4, M5, M6, M7, M8> where
T: Clone + 'static,
T0: Clone + 'static,
M0: Mutator<T0>,
T1: Clone + 'static,
M1: Mutator<T1>,
T2: Clone + 'static,
M2: Mutator<T2>,
T3: Clone + 'static,
M3: Mutator<T3>,
T4: Clone + 'static,
M4: Mutator<T4>,
T5: Clone + 'static,
M5: Mutator<T5>,
T6: Clone + 'static,
M6: Mutator<T6>,
T7: Clone + 'static,
M7: Mutator<T7>,
T8: Clone + 'static,
M8: Mutator<T8>,
T: TupleStructure<Tuple9<T0, T1, T2, T3, T4, T5, T6, T7, T8>>,
sourceimpl<T, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, M0, M1, M2, M3, M4, M5, M6, M7, M8, M9> TupleMutator<T, Tuple10<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>> for Tuple10Mutator<M0, M1, M2, M3, M4, M5, M6, M7, M8, M9> where
T: Clone + 'static,
T0: Clone + 'static,
M0: Mutator<T0>,
T1: Clone + 'static,
M1: Mutator<T1>,
T2: Clone + 'static,
M2: Mutator<T2>,
T3: Clone + 'static,
M3: Mutator<T3>,
T4: Clone + 'static,
M4: Mutator<T4>,
T5: Clone + 'static,
M5: Mutator<T5>,
T6: Clone + 'static,
M6: Mutator<T6>,
T7: Clone + 'static,
M7: Mutator<T7>,
T8: Clone + 'static,
M8: Mutator<T8>,
T9: Clone + 'static,
M9: Mutator<T9>,
T: TupleStructure<Tuple10<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>>,