pub struct ConfigPlugin { /* private fields */ }Expand description
A plugin loaded from a config file.
Implementations§
Source§impl ConfigPlugin
impl ConfigPlugin
Sourcepub fn load(path: &Path) -> PluginResult<Self>
pub fn load(path: &Path) -> PluginResult<Self>
Load a plugin from a TOML file.
Sourcepub fn manifest(&self) -> &PluginManifest
pub fn manifest(&self) -> &PluginManifest
Get the plugin manifest.
Trait Implementations§
Source§impl Plugin for ConfigPlugin
impl Plugin for ConfigPlugin
Source§fn description(&self) -> &'static str
fn description(&self) -> &'static str
Returns a human-readable description of the plugin.
Source§fn capabilities(&self) -> PluginCapabilities
fn capabilities(&self) -> PluginCapabilities
Returns the capabilities this plugin provides.
Source§fn min_editor_version(&self) -> Option<&'static str>
fn min_editor_version(&self) -> Option<&'static str>
Returns the minimum editor version required.
Source§fn init(&mut self, _ctx: &PluginContext) -> PluginResult<()>
fn init(&mut self, _ctx: &PluginContext) -> PluginResult<()>
Initialize the plugin with the given context. Read more
Source§fn activate(&mut self, _ctx: &PluginContext) -> PluginResult<()>
fn activate(&mut self, _ctx: &PluginContext) -> PluginResult<()>
Activate the plugin. Read more
Source§fn deactivate(&mut self, _ctx: &PluginContext) -> PluginResult<()>
fn deactivate(&mut self, _ctx: &PluginContext) -> PluginResult<()>
Deactivate the plugin. Read more
Source§fn commands(&self) -> Vec<CommandConfig>
fn commands(&self) -> Vec<CommandConfig>
Returns the commands this plugin provides.
Source§fn keybindings(&self) -> Vec<KeybindingConfig>
fn keybindings(&self) -> Vec<KeybindingConfig>
Returns the keybindings this plugin provides.
Source§fn execute_command(
&mut self,
command: &str,
args: &str,
ctx: &PluginContext,
) -> bool
fn execute_command( &mut self, command: &str, args: &str, ctx: &PluginContext, ) -> bool
Execute a command provided by this plugin. Read more
Source§fn as_any_mut(&mut self) -> &mut dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
Get a mutable reference to self as Any (for downcasting).
Source§fn dependencies(&self) -> &[&'static str]
fn dependencies(&self) -> &[&'static str]
Returns names of plugins this plugin depends on.
Source§fn pane_types(&self) -> Vec<PaneConfig>
fn pane_types(&self) -> Vec<PaneConfig>
Returns the pane types this plugin provides.
Source§fn themes(&self) -> Vec<ThemeDefinition>
fn themes(&self) -> Vec<ThemeDefinition>
Returns the custom themes this plugin provides. Read more
Source§fn custom_table_panes(&self) -> Vec<CustomTableConfig>
fn custom_table_panes(&self) -> Vec<CustomTableConfig>
Returns the custom table pane types this plugin provides. Read more
Source§fn custom_chart_panes(&self) -> Vec<CustomChartConfig>
fn custom_chart_panes(&self) -> Vec<CustomChartConfig>
Returns the custom chart pane types this plugin provides. Read more
Source§fn custom_stat_panes(&self) -> Vec<StatPaneConfig>
fn custom_stat_panes(&self) -> Vec<StatPaneConfig>
Returns the custom stat pane types this plugin provides. Read more
Source§fn custom_gauge_panes(&self) -> Vec<GaugePaneConfig>
fn custom_gauge_panes(&self) -> Vec<GaugePaneConfig>
Returns the custom gauge pane types this plugin provides. Read more
Source§fn lifecycle_hooks(&self) -> Option<Box<dyn LifecycleHook>>
fn lifecycle_hooks(&self) -> Option<Box<dyn LifecycleHook>>
Returns the lifecycle hooks this plugin wants to receive.
Source§fn command_hooks(&self) -> Option<Box<dyn CommandHook>>
fn command_hooks(&self) -> Option<Box<dyn CommandHook>>
Returns the command hooks this plugin wants to receive.
Source§fn keyboard_hooks(&self) -> Option<Box<dyn KeyboardHook>>
fn keyboard_hooks(&self) -> Option<Box<dyn KeyboardHook>>
Returns the keyboard hooks this plugin wants to receive.
Source§fn theme_hooks(&self) -> Option<Box<dyn ThemeHook>>
fn theme_hooks(&self) -> Option<Box<dyn ThemeHook>>
Returns the theme hooks this plugin wants to receive.
Source§fn pane_hooks(&self) -> Option<Box<dyn PaneHook>>
fn pane_hooks(&self) -> Option<Box<dyn PaneHook>>
Returns the pane hooks this plugin wants to receive.
Source§fn on_theme_changed(&mut self, _theme: Theme)
fn on_theme_changed(&mut self, _theme: Theme)
Called when the theme changes. Read more
Source§fn refreshable_pane_types(&self) -> Vec<(&str, u32)>
fn refreshable_pane_types(&self) -> Vec<(&str, u32)>
Get pane types that have auto-refresh enabled. Read more
Source§fn trigger_pane_refresh(
&mut self,
_pane_type: &str,
_ctx: &PluginContext,
) -> bool
fn trigger_pane_refresh( &mut self, _pane_type: &str, _ctx: &PluginContext, ) -> bool
Trigger a refresh for a specific pane type. Read more
Auto Trait Implementations§
impl Freeze for ConfigPlugin
impl RefUnwindSafe for ConfigPlugin
impl Send for ConfigPlugin
impl Sync for ConfigPlugin
impl Unpin for ConfigPlugin
impl UnsafeUnpin for ConfigPlugin
impl UnwindSafe for ConfigPlugin
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more