pub struct LuaPlugin { /* private fields */ }Expand description
A Lua-based plugin.
Implementations§
Source§impl LuaPlugin
impl LuaPlugin
Sourcepub fn load(path: &Path) -> PluginResult<Self>
pub fn load(path: &Path) -> PluginResult<Self>
Load a Lua plugin from a file.
Sourcepub fn load_from_source(source: &str, path: &Path) -> PluginResult<Self>
pub fn load_from_source(source: &str, path: &Path) -> PluginResult<Self>
Load a Lua plugin from source code.
Trait Implementations§
Source§impl Plugin for LuaPlugin
impl Plugin for LuaPlugin
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 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 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 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
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 min_editor_version(&self) -> Option<&'static str>
fn min_editor_version(&self) -> Option<&'static str>
Returns the minimum editor version required.
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 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
Auto Trait Implementations§
impl !Freeze for LuaPlugin
impl !RefUnwindSafe for LuaPlugin
impl Send for LuaPlugin
impl Sync for LuaPlugin
impl Unpin for LuaPlugin
impl UnsafeUnpin for LuaPlugin
impl !UnwindSafe for LuaPlugin
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