pub trait Plugin:
Send
+ Sync
+ 'static {
const CONFIGURATION_SCHEMA: Option<&'static str> = None;
// Required method
fn create(context: CreateContext) -> Result<Self, String>
where Self: Sized;
// Provided methods
fn requirements() -> &'static [Requirement] { ... }
fn stop(&self, _context: Ctx) -> Result<(), String> { ... }
}Expand description
Complete portable Plugin object constructed once per admitted generation.
Provided Associated Constants§
Sourceconst CONFIGURATION_SCHEMA: Option<&'static str> = None
const CONFIGURATION_SCHEMA: Option<&'static str> = None
Portable JSON Schema for this Plugin’s configuration, when it accepts configuration.
Required Methods§
Provided Methods§
Sourcefn requirements() -> &'static [Requirement]
fn requirements() -> &'static [Requirement]
Source-declared named dependencies required by this object.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".