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§
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 Methods§
fn description(&self) -> &str
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".