Struct Tuple1Mutator

Source
pub struct Tuple1Mutator<M0> { /* private fields */ }
Expand description

A TupleMutator for types that have a 1-tuple structure

Implementations§

Source§

impl<M0> Tuple1Mutator<M0>

Source

pub fn new(mutator_0: M0) -> Self

Trait Implementations§

Source§

impl<M0: Default> Default for Tuple1Mutator<M0>

Source§

fn default() -> Tuple1Mutator<M0>

Returns the “default value” for a type. Read more
Source§

impl<T, T0, M0> TupleMutator<T, Tuple1<T0>> for Tuple1Mutator<M0>
where T: Clone + 'static + TupleStructure<Tuple1<T0>>, T0: Clone + 'static, M0: Mutator<T0>,

Source§

type Cache: Clone

Source§

type MutationStep: Clone

Source§

type ArbitraryStep: Clone

Source§

type UnmutateToken

Source§

fn initialize(&self)

Source§

fn default_arbitrary_step(&self) -> Self::ArbitraryStep

Source§

fn complexity<'a>( &self, value: TupleKind::Ref<'a>, cache: &'a Self::Cache, ) -> f64

Source§

fn is_valid<'a>(&self, value: TupleKind::Ref<'a>) -> bool

Source§

fn validate_value<'a>(&self, value: TupleKind::Ref<'a>) -> Option<Self::Cache>

Source§

fn default_mutation_step<'a>( &self, value: TupleKind::Ref<'a>, cache: &'a Self::Cache, ) -> Self::MutationStep

Source§

fn global_search_space_complexity(&self) -> f64

Source§

fn max_complexity(&self) -> f64

Source§

fn min_complexity(&self) -> f64

Source§

fn ordered_arbitrary( &self, step: &mut Self::ArbitraryStep, max_cplx: f64, ) -> Option<(T, f64)>

Source§

fn random_arbitrary(&self, max_cplx: f64) -> (T, f64)

Source§

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)>

Source§

fn random_mutate<'a>( &self, value: TupleKind::Mut<'a>, cache: &'a mut Self::Cache, max_cplx: f64, ) -> (Self::UnmutateToken, f64)

Source§

fn unmutate<'a>( &self, value: TupleKind::Mut<'a>, cache: &'a mut Self::Cache, t: Self::UnmutateToken, )

Source§

fn visit_subvalues<'a>( &self, value: TupleKind::Ref<'a>, cache: &'a Self::Cache, visit: &mut dyn FnMut(&'a dyn Any, f64), )

Auto Trait Implementations§

§

impl<M0> !Freeze for Tuple1Mutator<M0>

§

impl<M0> !RefUnwindSafe for Tuple1Mutator<M0>

§

impl<M0> Send for Tuple1Mutator<M0>
where M0: Send,

§

impl<M0> !Sync for Tuple1Mutator<M0>

§

impl<M0> Unpin for Tuple1Mutator<M0>
where M0: Unpin,

§

impl<M0> UnwindSafe for Tuple1Mutator<M0>
where M0: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.