pub struct PluginRegistry { /* private fields */ }Expand description
Plugin registry for managing registered plugins
Implementations§
Source§impl PluginRegistry
impl PluginRegistry
pub fn new() -> Self
Sourcepub fn register(&self, plugin: Arc<dyn AstPlugin>) -> PluginResult
pub fn register(&self, plugin: Arc<dyn AstPlugin>) -> PluginResult
Register a plugin
Sourcepub fn unregister(&self, name: &str) -> PluginResult
pub fn unregister(&self, name: &str) -> PluginResult
Unregister a plugin
Sourcepub fn list_plugins(&self) -> Vec<String>
pub fn list_plugins(&self) -> Vec<String>
Get all registered plugin names
Sourcepub fn get_plugins_for_type(
&self,
node_type: &NodeType,
) -> Vec<Arc<dyn AstPlugin>>
pub fn get_plugins_for_type( &self, node_type: &NodeType, ) -> Vec<Arc<dyn AstPlugin>>
Get plugins that can process a specific node type
Sourcepub fn get_metadata(&self, name: &str) -> Option<PluginMetadata>
pub fn get_metadata(&self, name: &str) -> Option<PluginMetadata>
Get plugin metadata
Sourcepub fn list_metadata(&self) -> Vec<PluginMetadata>
pub fn list_metadata(&self) -> Vec<PluginMetadata>
Get all plugin metadata
Sourcepub fn find_by_tag(&self, tag: &str) -> Vec<String>
pub fn find_by_tag(&self, tag: &str) -> Vec<String>
Find plugins by tag
Find plugins by author
Sourcepub fn check_dependencies(&self, name: &str) -> PluginResult
pub fn check_dependencies(&self, name: &str) -> PluginResult
Check plugin dependencies
Trait Implementations§
Source§impl Clone for PluginRegistry
impl Clone for PluginRegistry
Auto Trait Implementations§
impl Freeze for PluginRegistry
impl RefUnwindSafe for PluginRegistry
impl Send for PluginRegistry
impl Sync for PluginRegistry
impl Unpin for PluginRegistry
impl UnwindSafe for PluginRegistry
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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