pub trait Plugin: 'static {
// Required methods
fn id(&self) -> PluginId;
fn connect(&mut self, ctx: &mut Ctx<'_>) -> Result<(), PluginError>;
// Provided methods
fn title(&self) -> String { ... }
fn requires(&self) -> Vec<PluginId> { ... }
fn priority(&self) -> i32 { ... }
fn enabled(&self, _ctx: &Ctx<'_>) -> bool { ... }
fn disconnect(&mut self, _ctx: &mut Ctx<'_>) { ... }
}Expand description
An application feature.
Required Methods§
Provided Methods§
Sourcefn title(&self) -> String
fn title(&self) -> String
A human title (settings sections, the debug bridge); the id by default.
Sourcefn disconnect(&mut self, _ctx: &mut Ctx<'_>)
fn disconnect(&mut self, _ctx: &mut Ctx<'_>)
Releases what it holds outside the framework; its registrations are removed by the framework.