RulePlugin

Trait RulePlugin 

Source
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§

Source

fn get_metadata(&self) -> &PluginMetadata

Get plugin metadata

Source

fn register_actions(&self, engine: &mut RustRuleEngine) -> Result<()>

Register custom actions with the engine

Provided Methods§

Source

fn register_functions(&self, engine: &mut RustRuleEngine) -> Result<()>

Register custom functions with the engine

Source

fn unload(&mut self) -> Result<()>

Called when plugin is unloaded

Source

fn health_check(&mut self) -> PluginHealth

Health check for the plugin

Implementors§