pub struct PluginRegistry { /* private fields */ }Expand description
Plugin registry for dynamic language detection
Implementations§
Source§impl PluginRegistry
impl PluginRegistry
Sourcepub fn detect(&self, path: &Path) -> Option<&dyn LanguagePlugin>
pub fn detect(&self, path: &Path) -> Option<&dyn LanguagePlugin>
Detect which plugin should handle the given path (first match)
Sourcepub fn detect_all(&self, path: &Path) -> Vec<&dyn LanguagePlugin>
pub fn detect_all(&self, path: &Path) -> Vec<&dyn LanguagePlugin>
PSP-5: Detect ALL plugins that match the given path (polyglot support)
Returns all matching plugins instead of just the first, enabling multi-language verification in polyglot repositories.
Sourcepub fn get(&self, name: &str) -> Option<&dyn LanguagePlugin>
pub fn get(&self, name: &str) -> Option<&dyn LanguagePlugin>
Get a plugin by name
Sourcepub fn all(&self) -> &[Box<dyn LanguagePlugin>]
pub fn all(&self) -> &[Box<dyn LanguagePlugin>]
Get all registered plugins
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PluginRegistry
impl !RefUnwindSafe for PluginRegistry
impl Send for PluginRegistry
impl Sync for PluginRegistry
impl Unpin for PluginRegistry
impl UnsafeUnpin for PluginRegistry
impl !UnwindSafe for PluginRegistry
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