pub struct ConfidenceScore { /* private fields */ }Expand description
Builder for computing detection confidence from weighted signals.
Instead of hardcoded confidence values, each adapter accumulates signals (config files found, test dirs present, runner available, etc.) that dynamically determine how confident we are in the detection.
§Example
ⓘ
let confidence = ConfidenceScore::base(0.50)
.signal(0.20, project_dir.join("tests").is_dir())
.signal(0.10, project_dir.join("Cargo.lock").exists())
.signal(0.10, which::which("cargo").is_ok())
.finish();Implementations§
Auto Trait Implementations§
impl Freeze for ConfidenceScore
impl RefUnwindSafe for ConfidenceScore
impl Send for ConfidenceScore
impl Sync for ConfidenceScore
impl Unpin for ConfidenceScore
impl UnsafeUnpin for ConfidenceScore
impl UnwindSafe for ConfidenceScore
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