pub struct LineageRecord {
pub lineage_uuid: Uuid,
pub provenance_uuid: Uuid,
pub subject_uuid: Uuid,
pub subject_kind: SubjectKind,
pub role: LineageRole,
pub ordinal: u32,
pub contract_version: u32,
}Expand description
One immutable event-to-subject lineage row.
Fields§
§lineage_uuid: UuidDeterministic UUIDv8 derived from the canonical lineage row.
provenance_uuid: UuidOwning provenance event.
subject_uuid: UuidReferenced public graph/knowledge object.
subject_kind: SubjectKindClosed subject kind.
role: LineageRoleInput/output role.
ordinal: u32Deterministic position within the role.
contract_version: u32Lineage record contract.
Implementations§
Source§impl LineageRecord
impl LineageRecord
Sourcepub fn new(
provenance_uuid: Uuid,
subject_uuid: Uuid,
subject_kind: SubjectKind,
role: LineageRole,
ordinal: u32,
) -> Result<Self, ProvenanceError>
pub fn new( provenance_uuid: Uuid, subject_uuid: Uuid, subject_kind: SubjectKind, role: LineageRole, ordinal: u32, ) -> Result<Self, ProvenanceError>
Build and identify one canonical lineage row.
§Errors
Rejects nil UUIDs or canonical encoding failures.
Sourcepub fn canonical_bytes(&self) -> Result<Vec<u8>, ProvenanceError>
pub fn canonical_bytes(&self) -> Result<Vec<u8>, ProvenanceError>
Canonical bytes used for fingerprints and idempotency comparison.
§Errors
Returns a canonical encoding failure if shared bounds are exceeded.
Sourcepub fn fingerprint(&self) -> Result<[u8; 32], ProvenanceError>
pub fn fingerprint(&self) -> Result<[u8; 32], ProvenanceError>
Full domain-separated lineage fingerprint.
§Errors
Returns a canonical encoding failure if shared bounds are exceeded.
Trait Implementations§
Source§impl Clone for LineageRecord
impl Clone for LineageRecord
Source§impl Debug for LineageRecord
impl Debug for LineageRecord
impl Eq for LineageRecord
Source§impl PartialEq for LineageRecord
impl PartialEq for LineageRecord
impl StructuralPartialEq for LineageRecord
Auto Trait Implementations§
impl Freeze for LineageRecord
impl RefUnwindSafe for LineageRecord
impl Send for LineageRecord
impl Sync for LineageRecord
impl Unpin for LineageRecord
impl UnsafeUnpin for LineageRecord
impl UnwindSafe for LineageRecord
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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.