Skip to main content

Plugin

Trait Plugin 

Source
pub trait Plugin: Send + Sync {
    // Required methods
    fn name(&self) -> &str;
    fn version(&self) -> &str;
    fn plugin_type(&self) -> PluginType;
    fn init(&mut self, config: &Value) -> Result<(), FetchiumError>;
    fn shutdown(&mut self) -> Result<(), FetchiumError>;

    // Provided method
    fn description(&self) -> &str { ... }
}
Expand description

Base trait every plugin must implement.

Required Methods§

Source

fn name(&self) -> &str

Source

fn version(&self) -> &str

Source

fn plugin_type(&self) -> PluginType

Source

fn init(&mut self, config: &Value) -> Result<(), FetchiumError>

Source

fn shutdown(&mut self) -> Result<(), FetchiumError>

Provided Methods§

Source

fn description(&self) -> &str

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§