pub struct Provenance {
pub source: ProvenanceSource,
pub actor: Option<String>,
pub source_id: Option<Uuid>,
pub confidence: f32,
}Expand description
Source and authority metadata for an episodic record.
Fields§
§source: ProvenanceSource§actor: Option<String>§source_id: Option<Uuid>§confidence: f32Confidence in source attribution, not truth of the content.
Implementations§
Source§impl Provenance
impl Provenance
Sourcepub const fn new(source: ProvenanceSource) -> Self
pub const fn new(source: ProvenanceSource) -> Self
Create provenance with full source attribution confidence.
Sourcepub const fn with_confidence(self, confidence: f32) -> Self
pub const fn with_confidence(self, confidence: f32) -> Self
Clamp source attribution confidence to the valid range.
Sourcepub fn with_actor(self, actor: impl Into<String>) -> Self
pub fn with_actor(self, actor: impl Into<String>) -> Self
Attach an actor or process identity.
Trait Implementations§
Source§impl Clone for Provenance
impl Clone for Provenance
Source§impl Debug for Provenance
impl Debug for Provenance
Source§impl<'de> Deserialize<'de> for Provenance
impl<'de> Deserialize<'de> for Provenance
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 Provenance
impl PartialEq for Provenance
Source§impl Serialize for Provenance
impl Serialize for Provenance
impl StructuralPartialEq for Provenance
Auto Trait Implementations§
impl Freeze for Provenance
impl RefUnwindSafe for Provenance
impl Send for Provenance
impl Sync for Provenance
impl Unpin for Provenance
impl UnsafeUnpin for Provenance
impl UnwindSafe for Provenance
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