Skip to main content

Plugin

Trait Plugin 

Source
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§

Source

fn id(&self) -> PluginId

Source

fn connect(&mut self, ctx: &mut Ctx<'_>) -> Result<(), PluginError>

Registers what it brings.

Provided Methods§

Source

fn title(&self) -> String

A human title (settings sections, the debug bridge); the id by default.

Source

fn requires(&self) -> Vec<PluginId>

The plugins it needs connected first.

Source

fn priority(&self) -> i32

Among plugins ready at the same time, higher connects first.

Source

fn enabled(&self, _ctx: &Ctx<'_>) -> bool

Whether to connect it (a setting may switch it off).

Source

fn disconnect(&mut self, _ctx: &mut Ctx<'_>)

Releases what it holds outside the framework; its registrations are removed by the framework.

Implementations on Foreign Types§

Source§

impl Plugin for I18nPlugin

Source§

fn id(&self) -> PluginId

Source§

fn title(&self) -> String

Source§

fn priority(&self) -> i32

Source§

fn connect(&mut self, ctx: &mut Ctx<'_>) -> Result<(), PluginError>

Source§

fn disconnect(&mut self, ctx: &mut Ctx<'_>)

Source§

impl Plugin for ShowKeys

Source§

fn id(&self) -> PluginId

Source§

fn title(&self) -> String

Source§

fn requires(&self) -> Vec<PluginId>

Source§

fn enabled(&self, ctx: &Ctx<'_>) -> bool

Source§

fn connect(&mut self, ctx: &mut Ctx<'_>) -> Result<(), PluginError>

Source§

impl Plugin for ImagingPlugin

Source§

fn id(&self) -> PluginId

Source§

fn title(&self) -> String

Source§

fn connect(&mut self, ctx: &mut Ctx<'_>) -> Result<(), PluginError>

Source§

impl Plugin for SystemClipboardPlugin

Source§

fn id(&self) -> PluginId

Source§

fn title(&self) -> String

Source§

fn requires(&self) -> Vec<PluginId>

Source§

fn connect(&mut self, ctx: &mut Ctx<'_>) -> Result<(), PluginError>

Source§

fn disconnect(&mut self, ctx: &mut Ctx<'_>)

Source§

impl Plugin for CrashPlugin

Source§

fn id(&self) -> PluginId

Source§

fn title(&self) -> String

Source§

fn priority(&self) -> i32

Source§

fn connect(&mut self, ctx: &mut Ctx<'_>) -> Result<(), PluginError>

Source§

fn disconnect(&mut self, _ctx: &mut Ctx<'_>)

Source§

impl Plugin for FocusModePlugin

Source§

fn id(&self) -> PluginId

Source§

fn title(&self) -> String

Source§

fn connect(&mut self, ctx: &mut Ctx<'_>) -> Result<(), PluginError>

Source§

impl Plugin for InstancePlugin

Source§

fn id(&self) -> PluginId

Source§

fn title(&self) -> String

Source§

fn connect(&mut self, ctx: &mut Ctx<'_>) -> Result<(), PluginError>

Source§

fn disconnect(&mut self, _ctx: &mut Ctx<'_>)

Source§

impl Plugin for SystemKeysPlugin

Source§

fn id(&self) -> PluginId

Source§

fn title(&self) -> String

Source§

fn connect(&mut self, ctx: &mut Ctx<'_>) -> Result<(), PluginError>

Source§

fn disconnect(&mut self, _ctx: &mut Ctx<'_>)

Source§

impl Plugin for LogsPlugin

Source§

fn id(&self) -> PluginId

Source§

fn title(&self) -> String

Source§

fn priority(&self) -> i32

Source§

fn connect(&mut self, ctx: &mut Ctx<'_>) -> Result<(), PluginError>

Source§

fn disconnect(&mut self, _ctx: &mut Ctx<'_>)

Source§

impl Plugin for NotifyPlugin

Source§

fn id(&self) -> PluginId

Source§

fn title(&self) -> String

Source§

fn connect(&mut self, ctx: &mut Ctx<'_>) -> Result<(), PluginError>

Source§

fn disconnect(&mut self, ctx: &mut Ctx<'_>)

Source§

impl Plugin for OpenPlugin

Source§

fn id(&self) -> PluginId

Source§

fn title(&self) -> String

Source§

fn requires(&self) -> Vec<PluginId>

Source§

fn connect(&mut self, ctx: &mut Ctx<'_>) -> Result<(), PluginError>

Source§

fn disconnect(&mut self, ctx: &mut Ctx<'_>)

Source§

impl Plugin for ThumbnailsPlugin

Source§

fn id(&self) -> PluginId

Source§

fn title(&self) -> String

Source§

fn requires(&self) -> Vec<PluginId>

Source§

fn connect(&mut self, ctx: &mut Ctx<'_>) -> Result<(), PluginError>

Source§

impl Plugin for TrayPlugin

Source§

fn id(&self) -> PluginId

Source§

fn title(&self) -> String

Source§

fn connect(&mut self, ctx: &mut Ctx<'_>) -> Result<(), PluginError>

Source§

fn disconnect(&mut self, _ctx: &mut Ctx<'_>)

Source§

impl Plugin for LibraryPlugin

Available on crate feature api only.
Source§

fn id(&self) -> PluginId

Source§

fn title(&self) -> String

Source§

fn connect(&mut self, ctx: &mut Ctx<'_>) -> Result<(), PluginError>

Source§

impl Plugin for PlotPlugin

Available on crate feature api only.
Source§

fn id(&self) -> PluginId

Source§

fn title(&self) -> String

Source§

fn connect(&mut self, ctx: &mut Ctx<'_>) -> Result<(), PluginError>

Source§

impl Plugin for ViewsPlugin

Available on crate feature api only.
Source§

fn id(&self) -> PluginId

Source§

fn title(&self) -> String

Source§

fn connect(&mut self, ctx: &mut Ctx<'_>) -> Result<(), PluginError>

Source§

impl Plugin for TimelinePlugin

Available on crate feature api only.
Source§

fn id(&self) -> PluginId

Source§

fn title(&self) -> String

Source§

fn connect(&mut self, ctx: &mut Ctx<'_>) -> Result<(), PluginError>

Source§

impl Plugin for VideoPlugin

Available on crate feature api only.
Source§

fn id(&self) -> PluginId

Source§

fn title(&self) -> String

Source§

fn connect(&mut self, ctx: &mut Ctx<'_>) -> Result<(), PluginError>

Source§

impl Plugin for ViewerPlugin

Source§

fn id(&self) -> PluginId

Source§

fn title(&self) -> String

Source§

fn requires(&self) -> Vec<PluginId>

Source§

fn connect(&mut self, ctx: &mut Ctx<'_>) -> Result<(), PluginError>

Source§

fn disconnect(&mut self, ctx: &mut Ctx<'_>)

§

impl Plugin for EditorsPlugin

Available on crate feature api only.
§

fn id(&self) -> PluginId

§

fn title(&self) -> String

§

fn connect(&mut self, ctx: &mut Ctx<'_>) -> Result<(), PluginError>

§

impl Plugin for JobConsolesPlugin

§

fn id(&self) -> PluginId

§

fn title(&self) -> String

§

fn connect(&mut self, ctx: &mut Ctx<'_>) -> Result<(), PluginError>

§

impl Plugin for TerminalPlugin

Available on crate feature api only.
§

fn id(&self) -> PluginId

§

fn title(&self) -> String

§

fn connect(&mut self, ctx: &mut Ctx<'_>) -> Result<(), PluginError>

Implementors§