pub trait RulePlugin: Send + Sync {
// Required methods
fn get_metadata(&self) -> &PluginMetadata;
fn register_actions(&self, engine: &mut RustRuleEngine) -> Result<()>;
// Provided methods
fn register_functions(&self, engine: &mut RustRuleEngine) -> Result<()> { ... }
fn unload(&mut self) -> Result<()> { ... }
fn health_check(&mut self) -> PluginHealth { ... }
}Expand description
Core trait that all plugins must implement
Required Methods§
Sourcefn get_metadata(&self) -> &PluginMetadata
fn get_metadata(&self) -> &PluginMetadata
Get plugin metadata
Sourcefn register_actions(&self, engine: &mut RustRuleEngine) -> Result<()>
fn register_actions(&self, engine: &mut RustRuleEngine) -> Result<()>
Register custom actions with the engine
Provided Methods§
Sourcefn register_functions(&self, engine: &mut RustRuleEngine) -> Result<()>
fn register_functions(&self, engine: &mut RustRuleEngine) -> Result<()>
Register custom functions with the engine
Sourcefn health_check(&mut self) -> PluginHealth
fn health_check(&mut self) -> PluginHealth
Health check for the plugin