pub struct BrainHealth {
pub healthy: bool,
pub events_processed: u64,
pub non_hold_decisions: u64,
pub details: Value,
}Expand description
Reported health of a Brain. Surfaces to the supervisor’s health endpoint.
Fields§
§healthy: boolIs the brain healthy enough to continue trading?
events_processed: u64Number of events processed since startup.
non_hold_decisions: u64Number of decisions emitted that were not Hold.
details: ValueFree-form status fields for the /health JSON response.
Implementations§
Source§impl BrainHealth
impl BrainHealth
Sourcepub fn ok() -> BrainHealth
pub fn ok() -> BrainHealth
A healthy default with zero counters.
Sourcepub fn unhealthy(reason: impl Into<String>) -> BrainHealth
pub fn unhealthy(reason: impl Into<String>) -> BrainHealth
An unhealthy state with a single reason field in details.
Trait Implementations§
Source§impl Clone for BrainHealth
impl Clone for BrainHealth
Source§fn clone(&self) -> BrainHealth
fn clone(&self) -> BrainHealth
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 BrainHealth
impl Debug for BrainHealth
Source§impl Default for BrainHealth
impl Default for BrainHealth
Source§fn default() -> BrainHealth
fn default() -> BrainHealth
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for BrainHealth
impl<'de> Deserialize<'de> for BrainHealth
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<BrainHealth, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<BrainHealth, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for BrainHealth
impl Serialize for BrainHealth
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
Auto Trait Implementations§
impl Freeze for BrainHealth
impl RefUnwindSafe for BrainHealth
impl Send for BrainHealth
impl Sync for BrainHealth
impl Unpin for BrainHealth
impl UnsafeUnpin for BrainHealth
impl UnwindSafe for BrainHealth
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