pub struct ExtensionEvent {
pub generation: usize,
pub diversity: f64,
pub extension_type: &'static str,
pub threshold: f64,
}Expand description
Payload for the GaObserver::on_extension_triggered hook.
Stack-allocated and Copy-able — zero heap allocation.
Fields§
§generation: usizeThe generation at which the extension fired.
diversity: f64Population diversity at the time of extension.
extension_type: &'static strName of the extension strategy (e.g. "MassExtinction").
threshold: f64Diversity threshold that triggered the extension.
Trait Implementations§
Source§impl Clone for ExtensionEvent
impl Clone for ExtensionEvent
Source§fn clone(&self) -> ExtensionEvent
fn clone(&self) -> ExtensionEvent
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 moreSource§impl Debug for ExtensionEvent
impl Debug for ExtensionEvent
impl Copy for ExtensionEvent
Auto Trait Implementations§
impl Freeze for ExtensionEvent
impl RefUnwindSafe for ExtensionEvent
impl Send for ExtensionEvent
impl Sync for ExtensionEvent
impl Unpin for ExtensionEvent
impl UnsafeUnpin for ExtensionEvent
impl UnwindSafe for ExtensionEvent
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,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more