TupleMutatorWrapper

Struct TupleMutatorWrapper 

Source
pub struct TupleMutatorWrapper<T, M, TupleKind>
where T: Clone + 'static + TupleStructure<TupleKind>, TupleKind: RefTypes, M: TupleMutator<T, TupleKind>,
{ pub mutator: M, /* private fields */ }

Fields§

§mutator: M

Implementations§

Source§

impl<T, M, TupleKind> TupleMutatorWrapper<T, M, TupleKind>
where T: Clone + 'static + TupleStructure<TupleKind>, TupleKind: RefTypes, M: TupleMutator<T, TupleKind>,

Source

pub fn new(mutator: M) -> Self

Trait Implementations§

Source§

impl<T, M, TupleKind> Default for TupleMutatorWrapper<T, M, TupleKind>
where T: Clone + 'static + TupleStructure<TupleKind>, TupleKind: RefTypes, M: TupleMutator<T, TupleKind> + Default,

Source§

fn default() -> Self

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

impl<T, M, TupleKind> Mutator<T> for TupleMutatorWrapper<T, M, TupleKind>
where T: Clone + 'static + TupleStructure<TupleKind>, TupleKind: RefTypes, M: TupleMutator<T, TupleKind>,

Source§

type Cache = <M as TupleMutator<T, TupleKind>>::Cache

Source§

type MutationStep = <M as TupleMutator<T, TupleKind>>::MutationStep

Source§

type ArbitraryStep = <M as TupleMutator<T, TupleKind>>::ArbitraryStep

Source§

type UnmutateToken = <M as TupleMutator<T, TupleKind>>::UnmutateToken

Source§

fn complexity(&self, value: &T, cache: &Self::Cache) -> f64

Source§

fn cache_from_value(&self, value: &T) -> Self::Cache

Compute the cache for the given value
Source§

fn initial_step_from_value(&self, value: &T) -> Self::MutationStep

Compute the initial mutation step for the given value
Source§

fn max_complexity(&self) -> f64

The maximum complexity of an input of this type
Source§

fn min_complexity(&self) -> f64

The minimum complexity of an input of this type
Source§

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

Source§

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

Source§

fn ordered_mutate( &self, value: &mut T, cache: &mut Self::Cache, step: &mut Self::MutationStep, max_cplx: f64, ) -> Option<Self::UnmutateToken>

Source§

fn random_mutate( &self, value: &mut T, cache: &mut Self::Cache, max_cplx: f64, ) -> Self::UnmutateToken

Source§

fn unmutate( &self, value: &mut T, cache: &mut Self::Cache, t: Self::UnmutateToken, )

Auto Trait Implementations§

§

impl<T, M, TupleKind> Freeze for TupleMutatorWrapper<T, M, TupleKind>
where M: Freeze,

§

impl<T, M, TupleKind> RefUnwindSafe for TupleMutatorWrapper<T, M, TupleKind>
where M: RefUnwindSafe, T: RefUnwindSafe, TupleKind: RefUnwindSafe,

§

impl<T, M, TupleKind> Send for TupleMutatorWrapper<T, M, TupleKind>
where M: Send, T: Send, TupleKind: Send,

§

impl<T, M, TupleKind> Sync for TupleMutatorWrapper<T, M, TupleKind>
where M: Sync, T: Sync, TupleKind: Sync,

§

impl<T, M, TupleKind> Unpin for TupleMutatorWrapper<T, M, TupleKind>
where M: Unpin, T: Unpin, TupleKind: Unpin,

§

impl<T, M, TupleKind> UnwindSafe for TupleMutatorWrapper<T, M, TupleKind>
where M: UnwindSafe, T: UnwindSafe, TupleKind: 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.
Source§

impl<T> TupleStructure<Tuple1<T>> for T
where T: 'static,

Source§

fn get_ref<'a>(&'a self) -> &'a T

Source§

fn get_mut<'a>(&'a mut self) -> &'a mut T

Source§

fn new(t: T) -> T