pub struct AssertionValidityLedger {
pub events: Vec<AssertionValidityEvent>,
}Expand description
Validated append-only assertion-validity participant.
Fields§
§events: Vec<AssertionValidityEvent>Events ordered by (recorded_at, validity_event_uuid).
Implementations§
Source§impl AssertionValidityLedger
impl AssertionValidityLedger
Sourcepub fn new(events: Vec<AssertionValidityEvent>) -> Result<Self, KnowledgeError>
pub fn new(events: Vec<AssertionValidityEvent>) -> Result<Self, KnowledgeError>
Validate, sort, and construct one complete participant.
Sourcepub fn merge(&self, staged: &Self) -> Result<Self, KnowledgeError>
pub fn merge(&self, staged: &Self) -> Result<Self, KnowledgeError>
Merge staged append-only events with exact replay semantics.
Sourcepub fn current_for_at(
&self,
assertion_uuid: Uuid,
transaction_cutoff_micros: i64,
) -> Option<&AssertionValidityEvent>
pub fn current_for_at( &self, assertion_uuid: Uuid, transaction_cutoff_micros: i64, ) -> Option<&AssertionValidityEvent>
Select the validity interpretation visible at transaction cutoff.
Sourcepub fn is_valid_at(
&self,
assertion_uuid: Uuid,
transaction_cutoff_micros: i64,
valid_time_micros: i64,
) -> Option<bool>
pub fn is_valid_at( &self, assertion_uuid: Uuid, transaction_cutoff_micros: i64, valid_time_micros: i64, ) -> Option<bool>
Test validity using the interpretation visible at transaction cutoff.
Sourcepub fn event_fingerprint(
&self,
validity_event_uuid: Uuid,
) -> Result<[u8; 32], KnowledgeError>
pub fn event_fingerprint( &self, validity_event_uuid: Uuid, ) -> Result<[u8; 32], KnowledgeError>
Canonical fingerprint over one exact immutable event.
Sourcepub fn batch(&self) -> Result<RecordBatch, KnowledgeError>
pub fn batch(&self) -> Result<RecordBatch, KnowledgeError>
Build the authoritative Arrow batch.
Sourcepub fn from_batches(batches: &[RecordBatch]) -> Result<Self, KnowledgeError>
pub fn from_batches(batches: &[RecordBatch]) -> Result<Self, KnowledgeError>
Decode and validate exact Arrow batches.
Trait Implementations§
Source§impl Clone for AssertionValidityLedger
impl Clone for AssertionValidityLedger
Source§impl Debug for AssertionValidityLedger
impl Debug for AssertionValidityLedger
Source§impl Default for AssertionValidityLedger
impl Default for AssertionValidityLedger
impl Eq for AssertionValidityLedger
Source§impl PartialEq for AssertionValidityLedger
impl PartialEq for AssertionValidityLedger
impl StructuralPartialEq for AssertionValidityLedger
Auto Trait Implementations§
impl Freeze for AssertionValidityLedger
impl RefUnwindSafe for AssertionValidityLedger
impl Send for AssertionValidityLedger
impl Sync for AssertionValidityLedger
impl Unpin for AssertionValidityLedger
impl UnsafeUnpin for AssertionValidityLedger
impl UnwindSafe for AssertionValidityLedger
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.