Skip to main content

Mutator

Trait Mutator 

Source
pub trait Mutator: Send + Sync {
    // Required methods
    fn generate_mutants(
        &self,
        ctxt: &MutationContext<'_>,
    ) -> Result<Vec<Mutant>>;
    fn is_applicable(&self, ctxt: &MutationContext<'_>) -> bool;
}

Required Methods§

Source

fn generate_mutants(&self, ctxt: &MutationContext<'_>) -> Result<Vec<Mutant>>

Generate all mutant corresponding to a given context

Source

fn is_applicable(&self, ctxt: &MutationContext<'_>) -> bool

True if a mutator can be applied to an expression/node

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§