pub struct PluginManager { /* private fields */ }Expand description
Plugin manager for loading and managing plugins
Implementations§
Source§impl PluginManager
impl PluginManager
Sourcepub fn get_plugin_dir() -> Result<PathBuf>
pub fn get_plugin_dir() -> Result<PathBuf>
Get the default plugin directory
Sourcepub fn discover_plugins(&mut self) -> Result<usize>
pub fn discover_plugins(&mut self) -> Result<usize>
Discover and load all plugins from the plugin directory
Sourcepub fn get_plugin(&self, name: &str) -> Option<&Plugin>
pub fn get_plugin(&self, name: &str) -> Option<&Plugin>
Get a plugin by name
Sourcepub fn list_plugins(&self) -> Vec<&Plugin>
pub fn list_plugins(&self) -> Vec<&Plugin>
List all loaded plugins
Sourcepub async fn execute_command(
&self,
plugin_name: &str,
command_name: &str,
arguments: HashMap<String, String>,
) -> Result<PluginResult>
pub async fn execute_command( &self, plugin_name: &str, command_name: &str, arguments: HashMap<String, String>, ) -> Result<PluginResult>
Execute a plugin command
Sourcepub fn install_plugin(&mut self, source_path: &Path) -> Result<()>
pub fn install_plugin(&mut self, source_path: &Path) -> Result<()>
Install a plugin from a path
Sourcepub fn uninstall_plugin(&mut self, name: &str) -> Result<()>
pub fn uninstall_plugin(&mut self, name: &str) -> Result<()>
Uninstall a plugin
Sourcepub fn enable_plugin(&mut self, name: &str) -> Result<()>
pub fn enable_plugin(&mut self, name: &str) -> Result<()>
Enable a plugin
Sourcepub fn disable_plugin(&mut self, name: &str) -> Result<()>
pub fn disable_plugin(&mut self, name: &str) -> Result<()>
Disable a plugin
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PluginManager
impl RefUnwindSafe for PluginManager
impl Send for PluginManager
impl Sync for PluginManager
impl Unpin for PluginManager
impl UnwindSafe for PluginManager
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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