Skip to main content

Plugin

Trait Plugin 

Source
pub trait Plugin: Send + Sync {
    // Required methods
    fn name(&self) -> &str;
    fn version(&self) -> &str;
    fn description(&self) -> &str;
    fn plugin_type(&self) -> PluginType;
    fn initialize(&mut self, config: &Value) -> PluginResult<()>;
    fn cleanup(&mut self) -> PluginResult<()>;
    fn get_capabilities(&self) -> Vec<String>;
    fn execute(&self, command: &str, args: &Value) -> PluginResult<Value>;
}

Required Methods§

Source

fn name(&self) -> &str

Source

fn version(&self) -> &str

Source

fn description(&self) -> &str

Source

fn plugin_type(&self) -> PluginType

Source

fn initialize(&mut self, config: &Value) -> PluginResult<()>

Source

fn cleanup(&mut self) -> PluginResult<()>

Source

fn get_capabilities(&self) -> Vec<String>

Source

fn execute(&self, command: &str, args: &Value) -> PluginResult<Value>

Implementors§