pub struct AssertionStatusLedger {
pub events: Vec<AssertionStatusEvent>,
}Expand description
Validated append-only assertion-status participant.
Fields§
§events: Vec<AssertionStatusEvent>Events ordered by (recorded_at, status_event_uuid).
Implementations§
Source§impl AssertionStatusLedger
impl AssertionStatusLedger
Sourcepub fn new(events: Vec<AssertionStatusEvent>) -> Result<Self, KnowledgeError>
pub fn new(events: Vec<AssertionStatusEvent>) -> 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 event_fingerprint(
&self,
status_event_uuid: Uuid,
) -> Result<[u8; 32], KnowledgeError>
pub fn event_fingerprint( &self, status_event_uuid: Uuid, ) -> Result<[u8; 32], KnowledgeError>
Canonical fingerprint over one exact immutable event.
Sourcepub fn current_for(&self, assertion_uuid: Uuid) -> Option<&AssertionStatusEvent>
pub fn current_for(&self, assertion_uuid: Uuid) -> Option<&AssertionStatusEvent>
Resolve current status deterministically, returning None for statusless assertions.
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 AssertionStatusLedger
impl Clone for AssertionStatusLedger
Source§impl Debug for AssertionStatusLedger
impl Debug for AssertionStatusLedger
Source§impl Default for AssertionStatusLedger
impl Default for AssertionStatusLedger
impl Eq for AssertionStatusLedger
Source§impl PartialEq for AssertionStatusLedger
impl PartialEq for AssertionStatusLedger
impl StructuralPartialEq for AssertionStatusLedger
Auto Trait Implementations§
impl Freeze for AssertionStatusLedger
impl RefUnwindSafe for AssertionStatusLedger
impl Send for AssertionStatusLedger
impl Sync for AssertionStatusLedger
impl Unpin for AssertionStatusLedger
impl UnsafeUnpin for AssertionStatusLedger
impl UnwindSafe for AssertionStatusLedger
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.