Trait tap::plugin::PluginInstance
source · [−]pub trait PluginInstance {
fn name(&self) -> &'static str;
fn run(
&mut self,
argument: PluginArgument,
env: PluginEnvironment
) -> Result<PluginResult>;
}
Expand description
This trait must be implemented by all Plugin.
The run function will be called from a TaskScheduler Worker with argument
and env
, when a Plugin is executed.
Required methods
fn run(
&mut self,
argument: PluginArgument,
env: PluginEnvironment
) -> Result<PluginResult>
fn run(
&mut self,
argument: PluginArgument,
env: PluginEnvironment
) -> Result<PluginResult>
Run the plugin and pass it JSON argument
String.
Return the result as a JSON String
or an Error.