pub struct TemporalAspect {
pub kind: TemporalAspectKind,
pub custom_label: Option<String>,
pub instant: InstantBridge,
pub duration: Option<DurationBridge>,
pub asserted_by: Option<String>,
pub confidence: f64,
pub evidence_type: EvidenceType,
}Expand description
A single named temporal assertion about an asset.
Each aspect has its own instant, optional duration (for events/ performances), provenance (who asserted it), confidence, and evidence type. This allows multiple conflicting or complementary temporal assertions to coexist in the same sub-graph — e.g., a recording might have a production date asserted by the producer and a different one asserted by a historian.
Fields§
§kind: TemporalAspectKindThe kind of temporal assertion
custom_label: Option<String>Custom label for Custom kind (ignored for other kinds)
instant: InstantBridgeWhen this aspect occurred
duration: Option<DurationBridge>Optional duration (for events, performances, exhibitions)
asserted_by: Option<String>Who asserted this temporal aspect (DID)
confidence: f64Confidence in this assertion [0.0, 1.0]
evidence_type: EvidenceTypeHow this temporal assertion was determined
Implementations§
Source§impl TemporalAspect
impl TemporalAspect
Sourcepub fn new(kind: TemporalAspectKind, instant: InstantBridge) -> Self
pub fn new(kind: TemporalAspectKind, instant: InstantBridge) -> Self
Create a new temporal aspect.
Sourcepub fn with_label(self, label: &str) -> Self
pub fn with_label(self, label: &str) -> Self
Set a custom label (for Custom kind).
Sourcepub fn with_duration(self, duration: DurationBridge) -> Self
pub fn with_duration(self, duration: DurationBridge) -> Self
Set the duration.
Sourcepub fn with_asserted_by(self, did: &str) -> Self
pub fn with_asserted_by(self, did: &str) -> Self
Set who asserted this.
Sourcepub fn with_confidence(self, confidence: f64) -> Self
pub fn with_confidence(self, confidence: f64) -> Self
Set confidence.
Sourcepub fn with_evidence(self, evidence: EvidenceType) -> Self
pub fn with_evidence(self, evidence: EvidenceType) -> Self
Set evidence type.