pub struct IndustryFileDetector { /* private fields */ }Expand description
Industry file detector
Implementations§
Source§impl IndustryFileDetector
impl IndustryFileDetector
Sourcepub fn new(adapters: Vec<Box<dyn IndustryFileAdapter>>) -> Self
pub fn new(adapters: Vec<Box<dyn IndustryFileAdapter>>) -> Self
Create a new detector with the given adapters
Sourcepub fn detect_files(&self, project_root: &Path) -> Vec<FileDetectionResult>
pub fn detect_files(&self, project_root: &Path) -> Vec<FileDetectionResult>
Detect which industry files exist in the project root
Sourcepub fn get_best_adapter(
&self,
project_root: &Path,
) -> Option<&dyn IndustryFileAdapter>
pub fn get_best_adapter( &self, project_root: &Path, ) -> Option<&dyn IndustryFileAdapter>
Get the highest priority adapter that can handle the project
Sourcepub fn register_adapter(&mut self, adapter: Box<dyn IndustryFileAdapter>)
pub fn register_adapter(&mut self, adapter: Box<dyn IndustryFileAdapter>)
Register a new adapter
Auto Trait Implementations§
impl Freeze for IndustryFileDetector
impl !RefUnwindSafe for IndustryFileDetector
impl Send for IndustryFileDetector
impl Sync for IndustryFileDetector
impl Unpin for IndustryFileDetector
impl !UnwindSafe for IndustryFileDetector
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