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
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 !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