Expand description
Types implementing the Mutator trait.
This module provides the following mutators:
-
mutators for basic types such as
-
procedural macros to generate mutators for custom types:
#[derive(DefaultMutator)]
which works on most structs and enumsmake_mutator! { .. }
which works like#[derive(DefaultMutator)]
but is customisable
-
grammar-based string and syntax tree mutators (here) (supported on crate feature
grammar_mutator
only)
- basic blocks to build more complex mutators:
AlternationMutator<_, M>
to use multiple different mutators acting on the same test case typeEither<M1, M2>
is the regularEither
type, which also implementsMutator<T>
if bothM1
andM2
implement it tooRecursiveMutator
andRecurToMutator
are wrappers allowing mutators to call themselves recursively, which is necessary to mutate recursive types.MapMutator<..>
wraps a mutator and transforms the generated value using a user-provided function.
Modules
grammar
grammar_mutator
Grammar-based mutators and related utilties.
Mutators that can handle recursive types.
Mutators for tuple-like types
An efficient data structure to sample from a discrete, fixed distribution.
Structs
Constants
Traits
A trait for giving a type a default Mutator
A trait for convenience methods automatically implemented for all types that conform to Mutator<V>
A trait for types that are basic wrappers over a mutator, such as Box<M>
.