Skip to main content

ModuleInterface

Trait ModuleInterface 

Source
pub trait ModuleInterface:
    Identifiable
    + Configurable
    + ModuleCapability
    + VersionedInterface {
    // Required methods
    fn initialize(&mut self) -> CoreResult<()>;
    fn shutdown(&mut self) -> CoreResult<()>;
    fn health_check(&self) -> CoreResult<HealthStatus>;
    fn statistics(&self) -> HashMap<String, f64>;
    fn reset(&mut self) -> CoreResult<()>;
}
Expand description

Module interface descriptor

Required Methods§

Source

fn initialize(&mut self) -> CoreResult<()>

Initialize the module

Source

fn shutdown(&mut self) -> CoreResult<()>

Shutdown the module

Source

fn health_check(&self) -> CoreResult<HealthStatus>

Get module health status

Source

fn statistics(&self) -> HashMap<String, f64>

Get module statistics

Source

fn reset(&mut self) -> CoreResult<()>

Reset module state

Implementors§