pub struct ThresholdTuningState {
pub visible: bool,
pub threshold: f64,
pub original_threshold: f64,
pub estimated_matches: usize,
pub total_components: usize,
pub step: f64,
}Expand description
State for the threshold tuning overlay.
Allows users to interactively adjust the match threshold and see a preview of how it affects component matching.
Fields§
§visible: boolIs the overlay visible
threshold: f64Current threshold value (0.0 - 1.0)
original_threshold: f64Original threshold (before tuning started)
estimated_matches: usizePreview: estimated matches at current threshold
total_components: usizePreview: total components being compared
step: f64Step size for adjustment (default 0.05)
Implementations§
Source§impl ThresholdTuningState
impl ThresholdTuningState
Sourcepub fn new(threshold: f64, total_components: usize) -> Self
pub fn new(threshold: f64, total_components: usize) -> Self
Create a new threshold tuning state with initial values.
Sourcepub fn fine_increase(&mut self)
pub fn fine_increase(&mut self)
Fine increase (smaller step).
Sourcepub fn fine_decrease(&mut self)
pub fn fine_decrease(&mut self)
Fine decrease (smaller step).
Sourcepub fn set_estimated_matches(&mut self, matches: usize)
pub fn set_estimated_matches(&mut self, matches: usize)
Update the estimated matches preview.
Sourcepub fn match_percentage(&self) -> f64
pub fn match_percentage(&self) -> f64
Get the match ratio as a percentage.
Trait Implementations§
Source§impl Clone for ThresholdTuningState
impl Clone for ThresholdTuningState
Source§fn clone(&self) -> ThresholdTuningState
fn clone(&self) -> ThresholdTuningState
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ThresholdTuningState
impl Debug for ThresholdTuningState
Auto Trait Implementations§
impl Freeze for ThresholdTuningState
impl RefUnwindSafe for ThresholdTuningState
impl Send for ThresholdTuningState
impl Sync for ThresholdTuningState
impl Unpin for ThresholdTuningState
impl UnsafeUnpin for ThresholdTuningState
impl UnwindSafe for ThresholdTuningState
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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