pub struct ShellProfile {
pub shell_id: String,
pub lifecycle: ShellLifecycle,
pub dna: DNA,
pub born_at: u64,
pub total_ticks: u64,
pub total_energy_used: f64,
pub children_spawned: u64,
pub messages_sent: u64,
pub messages_received: u64,
pub config: ShellConfig,
}Expand description
Accumulated identity and stats for a shell.
Fields§
§shell_id: String§lifecycle: ShellLifecycle§dna: DNA§born_at: u64§total_ticks: u64§total_energy_used: f64§children_spawned: u64§messages_sent: u64§messages_received: u64§config: ShellConfigImplementations§
Source§impl ShellProfile
impl ShellProfile
pub fn new(config: ShellConfig, now: u64) -> Self
pub fn pathway_count(&self) -> usize
pub fn age_seconds(&self, now: u64) -> u64
pub fn efficiency(&self) -> f64
Sourcepub fn adaptation_score(&self) -> f64
pub fn adaptation_score(&self) -> f64
Adaptation score: DNA diversity × total strength.
Trait Implementations§
Source§impl Clone for ShellProfile
impl Clone for ShellProfile
Source§fn clone(&self) -> ShellProfile
fn clone(&self) -> ShellProfile
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 ShellProfile
impl Debug for ShellProfile
Source§impl<'de> Deserialize<'de> for ShellProfile
impl<'de> Deserialize<'de> for ShellProfile
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
Source§impl PartialEq for ShellProfile
impl PartialEq for ShellProfile
Source§fn eq(&self, other: &ShellProfile) -> bool
fn eq(&self, other: &ShellProfile) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ShellProfile
impl Serialize for ShellProfile
impl StructuralPartialEq for ShellProfile
Auto Trait Implementations§
impl Freeze for ShellProfile
impl RefUnwindSafe for ShellProfile
impl Send for ShellProfile
impl Sync for ShellProfile
impl Unpin for ShellProfile
impl UnsafeUnpin for ShellProfile
impl UnwindSafe for ShellProfile
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