pub struct ProvenanceEvent {
pub provenance_uuid: Uuid,
pub operation_uuid: Uuid,
pub event_kind: EventKind,
pub actor_uuid: Option<Uuid>,
pub recorded_at_micros: i64,
pub contract_version: u32,
}Expand description
One immutable provenance event.
Fields§
§provenance_uuid: UuidDeterministic UUIDv8 derived from the canonical event.
operation_uuid: UuidCaller transaction/idempotency identity.
event_kind: EventKindClosed event kind.
actor_uuid: Option<Uuid>Optional analyst/agent identity.
recorded_at_micros: i64Injected UTC transaction timestamp in microseconds.
contract_version: u32Event record contract.
Implementations§
Source§impl ProvenanceEvent
impl ProvenanceEvent
Sourcepub fn new(
operation_uuid: Uuid,
event_kind: EventKind,
actor_uuid: Option<Uuid>,
recorded_at_micros: i64,
) -> Result<Self, ProvenanceError>
pub fn new( operation_uuid: Uuid, event_kind: EventKind, actor_uuid: Option<Uuid>, recorded_at_micros: i64, ) -> Result<Self, ProvenanceError>
Build and identify one canonical event.
§Errors
Rejects nil operation/actor 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 event fingerprint.
§Errors
Returns a canonical encoding failure if shared bounds are exceeded.
Trait Implementations§
Source§impl Clone for ProvenanceEvent
impl Clone for ProvenanceEvent
Source§fn clone(&self) -> ProvenanceEvent
fn clone(&self) -> ProvenanceEvent
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 ProvenanceEvent
impl Debug for ProvenanceEvent
impl Eq for ProvenanceEvent
Source§impl PartialEq for ProvenanceEvent
impl PartialEq for ProvenanceEvent
impl StructuralPartialEq for ProvenanceEvent
Auto Trait Implementations§
impl Freeze for ProvenanceEvent
impl RefUnwindSafe for ProvenanceEvent
impl Send for ProvenanceEvent
impl Sync for ProvenanceEvent
impl Unpin for ProvenanceEvent
impl UnsafeUnpin for ProvenanceEvent
impl UnwindSafe for ProvenanceEvent
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.