pub struct MatchInfo {
pub score: f64,
pub method: String,
pub reason: String,
pub score_breakdown: Vec<MatchScoreComponent>,
pub normalizations: Vec<String>,
pub confidence_interval: Option<ConfidenceInterval>,
}Expand description
Information about how a component was matched.
Included in JSON output to explain why components were correlated.
Fields§
§score: f64Match confidence score (0.0 - 1.0)
method: StringMatching method used (ExactIdentifier, Alias, Fuzzy, etc.)
reason: StringHuman-readable explanation
score_breakdown: Vec<MatchScoreComponent>Detailed score breakdown (optional)
normalizations: Vec<String>Normalizations applied during matching
confidence_interval: Option<ConfidenceInterval>Confidence interval for the match score
Implementations§
Source§impl MatchInfo
impl MatchInfo
Sourcepub fn from_explanation(explanation: &MatchExplanation) -> Self
pub fn from_explanation(explanation: &MatchExplanation) -> Self
Create from a MatchExplanation
Sourcepub fn simple(score: f64, method: &str, reason: &str) -> Self
pub fn simple(score: f64, method: &str, reason: &str) -> Self
Create a simple match info without detailed breakdown
Sourcepub const fn with_confidence_interval(self, ci: ConfidenceInterval) -> Self
pub const fn with_confidence_interval(self, ci: ConfidenceInterval) -> Self
Create a match info with a custom confidence interval
Trait Implementations§
Source§impl<'de> Deserialize<'de> for MatchInfo
impl<'de> Deserialize<'de> for MatchInfo
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for MatchInfo
impl RefUnwindSafe for MatchInfo
impl Send for MatchInfo
impl Sync for MatchInfo
impl Unpin for MatchInfo
impl UnsafeUnpin for MatchInfo
impl UnwindSafe for MatchInfo
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