pub struct PluginLoader { /* private fields */ }Expand description
Main plugin loader
Implementations§
Source§impl PluginLoader
impl PluginLoader
Sourcepub fn new(config: PluginLoaderConfig) -> Self
pub fn new(config: PluginLoaderConfig) -> Self
Create a new plugin loader
Sourcepub async fn load_all_plugins(&self) -> LoaderResult<PluginLoadStats>
pub async fn load_all_plugins(&self) -> LoaderResult<PluginLoadStats>
Load all plugins from configured directories
Sourcepub async fn load_plugin(&self, plugin_id: &PluginId) -> LoaderResult<()>
pub async fn load_plugin(&self, plugin_id: &PluginId) -> LoaderResult<()>
Load a specific plugin by ID
Sourcepub async fn unload_plugin(&self, plugin_id: &PluginId) -> LoaderResult<()>
pub async fn unload_plugin(&self, plugin_id: &PluginId) -> LoaderResult<()>
Unload a plugin
Sourcepub async fn get_plugin(&self, plugin_id: &PluginId) -> Option<PluginInstance>
pub async fn get_plugin(&self, plugin_id: &PluginId) -> Option<PluginInstance>
Get loaded plugin by ID
Sourcepub async fn list_plugins(&self) -> Vec<PluginId>
pub async fn list_plugins(&self) -> Vec<PluginId>
List all loaded plugins
Sourcepub async fn get_plugin_health(
&self,
plugin_id: &PluginId,
) -> LoaderResult<PluginHealth>
pub async fn get_plugin_health( &self, plugin_id: &PluginId, ) -> LoaderResult<PluginHealth>
Get plugin health status
Sourcepub async fn get_load_stats(&self) -> PluginLoadStats
pub async fn get_load_stats(&self) -> PluginLoadStats
Get loading statistics
Sourcepub async fn validate_plugin(
&self,
plugin_path: &Path,
) -> LoaderResult<PluginManifest>
pub async fn validate_plugin( &self, plugin_path: &Path, ) -> LoaderResult<PluginManifest>
Validate plugin without loading
Sourcepub async fn reload_all_plugins(&self) -> LoaderResult<PluginLoadStats>
pub async fn reload_all_plugins(&self) -> LoaderResult<PluginLoadStats>
Reload all plugins
Sourcepub async fn reload_plugin(&self, plugin_id: &PluginId) -> LoaderResult<()>
pub async fn reload_plugin(&self, plugin_id: &PluginId) -> LoaderResult<()>
Reload specific plugin
Sourcepub fn registry(&self) -> Arc<RwLock<PluginRegistry>>
pub fn registry(&self) -> Arc<RwLock<PluginRegistry>>
Get registry reference (for advanced operations)
Sourcepub fn validator(&self) -> &PluginValidator
pub fn validator(&self) -> &PluginValidator
Get validator reference (for advanced operations)
Sourcepub fn sandbox(&self) -> &PluginSandbox
pub fn sandbox(&self) -> &PluginSandbox
Get sandbox reference (for advanced operations)
Trait Implementations§
Source§impl Default for PluginLoader
impl Default for PluginLoader
impl Send for PluginLoader
impl Sync for PluginLoader
Auto Trait Implementations§
impl !Freeze for PluginLoader
impl !RefUnwindSafe for PluginLoader
impl Unpin for PluginLoader
impl !UnwindSafe for PluginLoader
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> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
Source§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
Query the “status” flags for the
self file descriptor.Source§fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
Source§fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
Set the “status” flags for the
self file descriptor. Read moreSource§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