pub struct Confidence {
pub kind: ConfidenceKind,
pub score: f64,
pub basis: String,
pub method: ConfidenceMethod,
pub components: Option<ConfidenceComponents>,
pub extraction_confidence: f64,
}Fields§
§kind: ConfidenceKindSemantic meaning of score. v0 emits frontier_epistemic.
score: f64§basis: String§method: ConfidenceMethodHow this score was determined.
components: Option<ConfidenceComponents>Structured component breakdown required by the current schema.
extraction_confidence: f64Confidence in the extraction itself (separate from scientific confidence).
Implementations§
Source§impl Confidence
impl Confidence
Sourcepub fn raw(
score: f64,
basis: impl Into<String>,
extraction_confidence: f64,
) -> Self
pub fn raw( score: f64, basis: impl Into<String>, extraction_confidence: f64, ) -> Self
Construct a Confidence with a raw score and basis string but
without the structured components breakdown. The agent layer
uses this when an LLM produces a single confidence value; the
computed deterministic components arrive later via
compute_confidence.
Renamed from legacy() in v0.36; the previous name was a
historical accident (the constructor was never actually
deprecated, just misnamed when the structured components shipped
alongside it).
Trait Implementations§
Source§impl Clone for Confidence
impl Clone for Confidence
Source§fn clone(&self) -> Confidence
fn clone(&self) -> Confidence
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 Confidence
impl Debug for Confidence
Source§impl<'de> Deserialize<'de> for Confidence
impl<'de> Deserialize<'de> for Confidence
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 Confidence
impl RefUnwindSafe for Confidence
impl Send for Confidence
impl Sync for Confidence
impl Unpin for Confidence
impl UnsafeUnpin for Confidence
impl UnwindSafe for Confidence
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