Trait tap::plugin::PluginInfo
source · [−]pub trait PluginInfo {
fn name(&self) -> &'static str;
fn category(&self) -> &'static str;
fn instantiate(&self) -> Box<dyn PluginInstance + Send + Sync>;
fn help(&self) -> &'static str;
fn config(&self) -> Result<PluginConfig>;
}
Expand description
This trait must be implemented by all Plugin. The PluginInfo trait give differents informations about a Plugin and permit to create a new instance of a Plugin via the instantiate method.
Required methods
fn instantiate(&self) -> Box<dyn PluginInstance + Send + Sync>
fn instantiate(&self) -> Box<dyn PluginInstance + Send + Sync>
Create and return a new instance of the Plugin
fn config(&self) -> Result<PluginConfig>
fn config(&self) -> Result<PluginConfig>
Return a JSON String with structure taken as argument