Trait NerveComponent
pub trait NerveComponent: Send + Sync {
// Required methods
fn id(&self) -> &ComponentId;
fn component_type(&self) -> ComponentType;
fn is_healthy(&self) -> bool;
fn get_statistics(&self) -> SystemStatistics;
fn reset_statistics(&mut self);
fn shutdown(&mut self) -> Result<(), NerveError>;
}Expand description
Base trait for all components
Required Methods§
fn id(&self) -> &ComponentId
fn id(&self) -> &ComponentId
Get component identifier
fn component_type(&self) -> ComponentType
fn component_type(&self) -> ComponentType
Get component type
fn is_healthy(&self) -> bool
fn is_healthy(&self) -> bool
Check if component is healthy
fn get_statistics(&self) -> SystemStatistics
fn get_statistics(&self) -> SystemStatistics
Get component statistics
fn reset_statistics(&mut self)
fn reset_statistics(&mut self)
Reset component statistics
fn shutdown(&mut self) -> Result<(), NerveError>
fn shutdown(&mut self) -> Result<(), NerveError>
Shutdown the component