pub struct PluginRegistry { /* private fields */ }Expand description
Central registry for all plugins
Implementations§
Source§impl PluginRegistry
impl PluginRegistry
Sourcepub fn with_builtins() -> Self
pub fn with_builtins() -> Self
Create registry with all built-in plugins
Sourcepub fn all_markers(&self) -> Vec<ProjectMarker>
pub fn all_markers(&self) -> Vec<ProjectMarker>
Get all registered markers for scanning
Sourcepub fn plugins_for_kind(&self, kind: ProjectKind) -> Vec<Arc<dyn Plugin>>
pub fn plugins_for_kind(&self, kind: ProjectKind) -> Vec<Arc<dyn Plugin>>
Find plugins that handle a project kind
Sourcepub fn is_cleanable_dir(&self, name: &str) -> bool
pub fn is_cleanable_dir(&self, name: &str) -> bool
Check if a directory name is a known cleanable artifact
Sourcepub fn plugins_for_cleanable_dir(&self, name: &str) -> Vec<Arc<dyn Plugin>>
pub fn plugins_for_cleanable_dir(&self, name: &str) -> Vec<Arc<dyn Plugin>>
Get plugins that can handle a cleanable directory
Sourcepub fn detect_project(
&self,
path: &Path,
) -> Option<(ProjectKind, Arc<dyn Plugin>)>
pub fn detect_project( &self, path: &Path, ) -> Option<(ProjectKind, Arc<dyn Plugin>)>
Detect project type at path
Sourcepub fn all_cleanable_dir_names(&self) -> Vec<&'static str>
pub fn all_cleanable_dir_names(&self) -> Vec<&'static str>
Get all unique cleanable directory names
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
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