pub trait Mutate<C>: Send + Syncwhere
C: Chromosome,{
// Provided methods
fn name(&self) -> String { ... }
fn rate(&self) -> Rate { ... }
fn alterer(self) -> Alterer<C>
where Self: Sized + 'static { ... }
fn mutate(
&mut self,
population: &mut [Phenotype<C>],
ctx: &mut AlterContext<'_>,
) -> AlterResult { ... }
fn mutate_genotype(
&mut self,
genotype: &mut Genotype<C>,
ctx: &mut AlterContext<'_>,
) -> AlterResult { ... }
fn mutate_chromosome(
&mut self,
chromosome: &mut C,
ctx: &mut AlterContext<'_>,
) -> AlterResult { ... }
fn mutate_gene(&self, gene: &mut <C as Chromosome>::Gene) -> usize { ... }
}Provided Methods§
fn name(&self) -> String
fn rate(&self) -> Rate
fn alterer(self) -> Alterer<C>where
Self: Sized + 'static,
fn mutate( &mut self, population: &mut [Phenotype<C>], ctx: &mut AlterContext<'_>, ) -> AlterResult
fn mutate_genotype( &mut self, genotype: &mut Genotype<C>, ctx: &mut AlterContext<'_>, ) -> AlterResult
fn mutate_chromosome( &mut self, chromosome: &mut C, ctx: &mut AlterContext<'_>, ) -> AlterResult
fn mutate_gene(&self, gene: &mut <C as Chromosome>::Gene) -> usize
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".