pub struct ProvenanceRecord {
pub version: String,
pub document_id: DocumentId,
pub created: DateTime<Utc>,
pub creator: Option<CreatorInfo>,
pub lineage: Option<Lineage>,
pub merkle: MerkleInfo,
pub timestamps: Vec<TimestampRecord>,
pub derived_from: Vec<DerivationRecord>,
}Expand description
Complete provenance record for a document.
This structure is stored at provenance/record.json and provides:
- Document identity and creation information
- Full lineage chain
- Merkle tree information for content integrity
- Timestamp records for temporal anchoring
- Derivation records for tracking content sources
Fields§
§version: StringVersion of the provenance record format.
document_id: DocumentIdDocument identifier.
created: DateTime<Utc>When the document was created.
creator: Option<CreatorInfo>Information about the document creator.
lineage: Option<Lineage>Lineage information.
merkle: MerkleInfoMerkle tree information.
timestamps: Vec<TimestampRecord>Timestamp records for temporal anchoring.
derived_from: Vec<DerivationRecord>Records of content derived from other sources.
Implementations§
Source§impl ProvenanceRecord
impl ProvenanceRecord
Sourcepub fn new(document_id: DocumentId, merkle: MerkleInfo) -> Self
pub fn new(document_id: DocumentId, merkle: MerkleInfo) -> Self
Create a new provenance record.
Sourcepub fn with_creator(self, creator: CreatorInfo) -> Self
pub fn with_creator(self, creator: CreatorInfo) -> Self
Set the creator information.
Sourcepub fn with_lineage(self, lineage: Lineage) -> Self
pub fn with_lineage(self, lineage: Lineage) -> Self
Set the lineage information.
Sourcepub fn with_timestamp(self, timestamp: TimestampRecord) -> Self
pub fn with_timestamp(self, timestamp: TimestampRecord) -> Self
Add a timestamp record.
Sourcepub fn with_derivation(self, derivation: DerivationRecord) -> Self
pub fn with_derivation(self, derivation: DerivationRecord) -> Self
Add a derivation record.
Trait Implementations§
Source§impl Clone for ProvenanceRecord
impl Clone for ProvenanceRecord
Source§fn clone(&self) -> ProvenanceRecord
fn clone(&self) -> ProvenanceRecord
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 ProvenanceRecord
impl Debug for ProvenanceRecord
Source§impl<'de> Deserialize<'de> for ProvenanceRecord
impl<'de> Deserialize<'de> for ProvenanceRecord
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 ProvenanceRecord
impl PartialEq for ProvenanceRecord
Source§impl Serialize for ProvenanceRecord
impl Serialize for ProvenanceRecord
impl Eq for ProvenanceRecord
impl StructuralPartialEq for ProvenanceRecord
Auto Trait Implementations§
impl Freeze for ProvenanceRecord
impl RefUnwindSafe for ProvenanceRecord
impl Send for ProvenanceRecord
impl Sync for ProvenanceRecord
impl Unpin for ProvenanceRecord
impl UnsafeUnpin for ProvenanceRecord
impl UnwindSafe for ProvenanceRecord
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.