pub struct EvidenceRecord {
pub id: String,
pub source_scope: SourceScope,
pub source_path: Option<String>,
pub span: Option<EvidenceSpan>,
pub content: String,
pub entity_labels: Vec<String>,
pub confidence: ConfidenceScore,
pub status: FactStatus,
pub extraction: EvidenceExtractionMetadata,
}Expand description
Evidence accepted by the graph mutation pipeline.
Fields§
§id: String§source_scope: SourceScope§source_path: Option<String>§span: Option<EvidenceSpan>§content: String§entity_labels: Vec<String>§confidence: ConfidenceScore§status: FactStatus§extraction: EvidenceExtractionMetadataImplementations§
Source§impl EvidenceRecord
impl EvidenceRecord
Sourcepub fn new(
id: impl Into<String>,
source_scope: SourceScope,
content: impl Into<String>,
entity_labels: Vec<String>,
) -> Result<Self, DomainError>
pub fn new( id: impl Into<String>, source_scope: SourceScope, content: impl Into<String>, entity_labels: Vec<String>, ) -> Result<Self, DomainError>
Validates evidence and normalizes entity labels before persistence.
Sourcepub fn with_metadata(
self,
source_path: Option<String>,
span: Option<EvidenceSpan>,
confidence: ConfidenceScore,
status: FactStatus,
) -> Result<Self, DomainError>
pub fn with_metadata( self, source_path: Option<String>, span: Option<EvidenceSpan>, confidence: ConfidenceScore, status: FactStatus, ) -> Result<Self, DomainError>
Attaches source-location and confidence metadata to evidence.
Sourcepub fn with_extraction_metadata(
self,
extraction: EvidenceExtractionMetadata,
) -> Result<Self, DomainError>
pub fn with_extraction_metadata( self, extraction: EvidenceExtractionMetadata, ) -> Result<Self, DomainError>
Attaches validated multimodal extraction metadata to the evidence.
Trait Implementations§
Source§impl Clone for EvidenceRecord
impl Clone for EvidenceRecord
Source§fn clone(&self) -> EvidenceRecord
fn clone(&self) -> EvidenceRecord
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 EvidenceRecord
impl Debug for EvidenceRecord
Source§impl<'de> Deserialize<'de> for EvidenceRecord
impl<'de> Deserialize<'de> for EvidenceRecord
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
Source§impl PartialEq for EvidenceRecord
impl PartialEq for EvidenceRecord
Source§fn eq(&self, other: &EvidenceRecord) -> bool
fn eq(&self, other: &EvidenceRecord) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for EvidenceRecord
impl Serialize for EvidenceRecord
impl Eq for EvidenceRecord
impl StructuralPartialEq for EvidenceRecord
Auto Trait Implementations§
impl Freeze for EvidenceRecord
impl RefUnwindSafe for EvidenceRecord
impl Send for EvidenceRecord
impl Sync for EvidenceRecord
impl Unpin for EvidenceRecord
impl UnsafeUnpin for EvidenceRecord
impl UnwindSafe for EvidenceRecord
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