pub enum CellHealth {
Healthy,
Stressed,
Compromised,
Redundant,
Senescent,
}Expand description
Health assessment of an agent (used by Apoptose).
Variants§
Healthy
Functioning normally.
Stressed
Under load but still functional.
Compromised
Integrity lost — should self-terminate.
Redundant
Others cover this function — can self-terminate.
Senescent
Too many cycles without useful output — should self-terminate.
Implementations§
Source§impl CellHealth
impl CellHealth
Sourcepub fn should_die(&self) -> bool
pub fn should_die(&self) -> bool
Whether this health state suggests the agent should die.
Trait Implementations§
Source§impl Clone for CellHealth
impl Clone for CellHealth
Source§fn clone(&self) -> CellHealth
fn clone(&self) -> CellHealth
Returns a duplicate of the value. Read more
1.0.0 · 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 CellHealth
impl Debug for CellHealth
Source§impl<'de> Deserialize<'de> for CellHealth
impl<'de> Deserialize<'de> for CellHealth
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<CellHealth, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<CellHealth, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for CellHealth
impl PartialEq for CellHealth
Source§impl Serialize for CellHealth
impl Serialize for CellHealth
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Copy for CellHealth
impl Eq for CellHealth
impl StructuralPartialEq for CellHealth
Auto Trait Implementations§
impl Freeze for CellHealth
impl RefUnwindSafe for CellHealth
impl Send for CellHealth
impl Sync for CellHealth
impl Unpin for CellHealth
impl UnwindSafe for CellHealth
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.