pub enum InheritanceStrategy {
Identical,
LowMutation,
MediumMutation,
HighMutation,
Exploration,
}Expand description
Strategy for inheriting traits to offspring
Variants§
Identical
Exact copy of parent traits
LowMutation
Inherit with small mutations (5% variance)
MediumMutation
Inherit with medium mutations (15% variance)
HighMutation
Inherit with high mutations (30% variance)
Exploration
Random traits within successful range
Implementations§
Source§impl InheritanceStrategy
impl InheritanceStrategy
Sourcepub fn mutation_rate(&self) -> f32
pub fn mutation_rate(&self) -> f32
Get mutation rate for this strategy
Trait Implementations§
Source§impl Clone for InheritanceStrategy
impl Clone for InheritanceStrategy
Source§fn clone(&self) -> InheritanceStrategy
fn clone(&self) -> InheritanceStrategy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for InheritanceStrategy
Source§impl Debug for InheritanceStrategy
impl Debug for InheritanceStrategy
Source§impl<'de> Deserialize<'de> for InheritanceStrategy
impl<'de> Deserialize<'de> for InheritanceStrategy
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for InheritanceStrategy
Source§impl PartialEq for InheritanceStrategy
impl PartialEq for InheritanceStrategy
Source§impl Serialize for InheritanceStrategy
impl Serialize for InheritanceStrategy
impl StructuralPartialEq for InheritanceStrategy
Auto Trait Implementations§
impl Freeze for InheritanceStrategy
impl RefUnwindSafe for InheritanceStrategy
impl Send for InheritanceStrategy
impl Sync for InheritanceStrategy
impl Unpin for InheritanceStrategy
impl UnsafeUnpin for InheritanceStrategy
impl UnwindSafe for InheritanceStrategy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.