pub struct PluginManager { /* private fields */ }Expand description
High-level plugin API for easy integration
Implementations§
Source§impl PluginManager
impl PluginManager
Sourcepub fn with_config(config: ExecutionConfig) -> Self
pub fn with_config(config: ExecutionConfig) -> Self
Create with custom configuration
Sourcepub fn register_plugin(&mut self, plugin: Arc<dyn AstPlugin>) -> PluginResult
pub fn register_plugin(&mut self, plugin: Arc<dyn AstPlugin>) -> PluginResult
Register a plugin
Sourcepub fn load_plugins_from_file<P: AsRef<Path>>(
&mut self,
path: P,
) -> Result<Vec<PluginResult>, Box<dyn Error>>
pub fn load_plugins_from_file<P: AsRef<Path>>( &mut self, path: P, ) -> Result<Vec<PluginResult>, Box<dyn Error>>
Load plugins from configuration file
Sourcepub fn add_plugin_path<P: AsRef<Path>>(&mut self, path: P)
pub fn add_plugin_path<P: AsRef<Path>>(&mut self, path: P)
Add search path for plugin discovery
Sourcepub fn discover_and_load_plugins(&mut self) -> Vec<PluginResult>
pub fn discover_and_load_plugins(&mut self) -> Vec<PluginResult>
Discover and load plugins from search paths
Sourcepub fn execute_plugins(&self, document: &mut PdfDocument) -> ExecutionSummary
pub fn execute_plugins(&self, document: &mut PdfDocument) -> ExecutionSummary
Execute all applicable plugins on a document
Sourcepub fn execute_plugins_by_name(
&self,
document: &mut PdfDocument,
plugin_names: &[String],
) -> ExecutionSummary
pub fn execute_plugins_by_name( &self, document: &mut PdfDocument, plugin_names: &[String], ) -> ExecutionSummary
Execute specific plugins by name
Sourcepub fn execute_plugins_for_type(
&self,
document: &mut PdfDocument,
node_type: &NodeType,
) -> ExecutionSummary
pub fn execute_plugins_for_type( &self, document: &mut PdfDocument, node_type: &NodeType, ) -> ExecutionSummary
Execute plugins for specific node type
Sourcepub fn get_plugin_info(&self, name: &str) -> Option<PluginMetadata>
pub fn get_plugin_info(&self, name: &str) -> Option<PluginMetadata>
Get plugin information
Sourcepub fn list_plugins(&self) -> Vec<PluginMetadata>
pub fn list_plugins(&self) -> Vec<PluginMetadata>
List all registered plugins
Sourcepub fn list_plugins_by_tag(&self, tag: &str) -> Vec<PluginMetadata>
pub fn list_plugins_by_tag(&self, tag: &str) -> Vec<PluginMetadata>
List plugins by tag
Sourcepub fn validate_dependencies(&self) -> HashMap<String, PluginResult>
pub fn validate_dependencies(&self) -> HashMap<String, PluginResult>
Check plugin dependencies
Sourcepub fn unload_plugin(&mut self, name: &str) -> PluginResult
pub fn unload_plugin(&mut self, name: &str) -> PluginResult
Unload a plugin
Sourcepub fn reload_plugin(&mut self, name: &str) -> PluginResult
pub fn reload_plugin(&mut self, name: &str) -> PluginResult
Reload a plugin
Sourcepub fn set_execution_config(&mut self, config: ExecutionConfig)
pub fn set_execution_config(&mut self, config: ExecutionConfig)
Set execution configuration
Sourcepub fn get_execution_config(&self) -> &ExecutionConfig
pub fn get_execution_config(&self) -> &ExecutionConfig
Get execution configuration
Sourcepub fn registry(&self) -> &PluginRegistry
pub fn registry(&self) -> &PluginRegistry
Get plugin registry
Sourcepub fn loader(&self) -> &PluginLoader
pub fn loader(&self) -> &PluginLoader
Get plugin loader
Sourcepub fn loader_mut(&mut self) -> &mut PluginLoader
pub fn loader_mut(&mut self) -> &mut PluginLoader
Get mutable plugin loader
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<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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