Trait NervePlugin
pub trait NervePlugin: Send + Sync {
// Required methods
fn name(&self) -> &str;
fn version(&self) -> &str;
fn component_type(&self) -> ComponentType;
fn initialize(&self, context: &PluginContext) -> Result<(), NerveError>;
fn shutdown(&self) -> Result<(), NerveError>;
fn is_healthy(&self) -> bool;
fn get_statistics(&self) -> SystemStatistics;
// Provided method
fn id(&self) -> ComponentId { ... }
}Expand description
Plugin interface for dynamic component loading
Required Methods§
fn component_type(&self) -> ComponentType
fn component_type(&self) -> ComponentType
Get the component type this plugin provides
fn initialize(&self, context: &PluginContext) -> Result<(), NerveError>
fn initialize(&self, context: &PluginContext) -> Result<(), NerveError>
Initialize the plugin
fn shutdown(&self) -> Result<(), NerveError>
fn shutdown(&self) -> Result<(), NerveError>
Shutdown the plugin
fn is_healthy(&self) -> bool
fn is_healthy(&self) -> bool
Check if plugin is healthy
fn get_statistics(&self) -> SystemStatistics
fn get_statistics(&self) -> SystemStatistics
Get plugin statistics
Provided Methods§
fn id(&self) -> ComponentId
fn id(&self) -> ComponentId
Get plugin identifier