pub struct DetectionEngine { /* private fields */ }Implementations§
Source§impl DetectionEngine
impl DetectionEngine
Sourcepub const BUILTIN_COUNT: usize = 11
pub const BUILTIN_COUNT: usize = 11
Number of built-in adapters (registered at construction time). Custom adapters are appended after these.
pub fn new() -> Self
Sourcepub fn detect(&self, project_dir: &Path) -> Option<DetectedProject>
pub fn detect(&self, project_dir: &Path) -> Option<DetectedProject>
Detect the best matching test framework for the given project directory. Returns the detection result and a reference to the matching adapter.
Sourcepub fn detect_all(&self, project_dir: &Path) -> Vec<DetectedProject>
pub fn detect_all(&self, project_dir: &Path) -> Vec<DetectedProject>
Detect all matching frameworks (for polyglot projects).
Sourcepub fn adapter(&self, index: usize) -> &dyn TestAdapter
pub fn adapter(&self, index: usize) -> &dyn TestAdapter
Get an adapter by index.
Sourcepub fn adapters(&self) -> &[Box<dyn TestAdapter>]
pub fn adapters(&self) -> &[Box<dyn TestAdapter>]
Get all registered adapters.
Sourcepub fn register(&mut self, adapter: Box<dyn TestAdapter>)
pub fn register(&mut self, adapter: Box<dyn TestAdapter>)
Register a custom adapter. Custom adapters are appended after built-in ones and participate in normal confidence-based detection.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DetectionEngine
impl !RefUnwindSafe for DetectionEngine
impl !Send for DetectionEngine
impl !Sync for DetectionEngine
impl Unpin for DetectionEngine
impl UnsafeUnpin for DetectionEngine
impl !UnwindSafe for DetectionEngine
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