pub struct VerificationMetrics {
pub total_sources: usize,
pub accessible_sources: usize,
pub supporting_sources: usize,
pub refuting_sources: usize,
pub neutral_sources: usize,
pub tier1_count: usize,
pub tier2_count: usize,
pub tier3_count: usize,
pub average_confidence: f64,
pub verification_time_ms: u64,
}Expand description
Aggregated verification metrics
Fields§
§total_sources: usizeTotal sources consulted
accessible_sources: usizeSources that were successfully accessed
supporting_sources: usizeSources that support the claim
refuting_sources: usizeSources that refute the claim
neutral_sources: usizeSources that are neutral/unclear
tier1_count: usizeCount by tier
tier2_count: usizeCount by tier
tier3_count: usizeCount by tier
average_confidence: f64Average weighted confidence
verification_time_ms: u64Total verification time in milliseconds
Implementations§
Source§impl VerificationMetrics
impl VerificationMetrics
Sourcepub fn from_sources(sources: &[VerifiedSource], time_ms: u64) -> Self
pub fn from_sources(sources: &[VerifiedSource], time_ms: u64) -> Self
Calculate metrics from verified sources
Sourcepub fn meets_triangulation(&self) -> bool
pub fn meets_triangulation(&self) -> bool
Check if triangulation requirement is met (3+ quality sources)
Sourcepub fn determine_status(&self) -> VerificationStatus
pub fn determine_status(&self) -> VerificationStatus
Determine verification status based on metrics
Uses a multi-step approach:
- Check if triangulation requirements are met
- Detect genuine conflicts (roughly even split)
- Determine majority status (agreement vs refutation)
- Apply confidence as a modifier within categories
Trait Implementations§
Source§impl Clone for VerificationMetrics
impl Clone for VerificationMetrics
Source§fn clone(&self) -> VerificationMetrics
fn clone(&self) -> VerificationMetrics
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 VerificationMetrics
impl Debug for VerificationMetrics
Source§impl Default for VerificationMetrics
impl Default for VerificationMetrics
Source§impl<'de> Deserialize<'de> for VerificationMetrics
impl<'de> Deserialize<'de> for VerificationMetrics
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 VerificationMetrics
impl RefUnwindSafe for VerificationMetrics
impl Send for VerificationMetrics
impl Sync for VerificationMetrics
impl Unpin for VerificationMetrics
impl UnwindSafe for VerificationMetrics
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