pub struct ResearchDecisionLedger { /* private fields */ }Expand description
Immutable canonical/integration history across all contexts of one container.
Implementations§
Source§impl ResearchDecisionLedger
impl ResearchDecisionLedger
Sourcepub fn batch(&self) -> Result<RecordBatch, KnowledgeError>
pub fn batch(&self) -> Result<RecordBatch, KnowledgeError>
Encode complete current history as native Arrow.
Sourcepub fn from_batches(batches: &[RecordBatch]) -> Result<Self, KnowledgeError>
pub fn from_batches(batches: &[RecordBatch]) -> Result<Self, KnowledgeError>
Decode complete history; filtered views are not valid publication ledgers.
Sourcepub fn new(events: Vec<ResearchDecisionRecord>) -> Result<Self, KnowledgeError>
pub fn new(events: Vec<ResearchDecisionRecord>) -> Result<Self, KnowledgeError>
Validate complete history; a missing ordinal is corruption, not expiry.
Sourcepub fn append(
&self,
staged: Vec<ResearchDecisionRecord>,
) -> Result<Self, KnowledgeError>
pub fn append( &self, staged: Vec<ResearchDecisionRecord>, ) -> Result<Self, KnowledgeError>
Append exact records or return an unchanged ledger on exact event replay.
Sourcepub fn events(&self) -> &[ResearchDecisionRecord]
pub fn events(&self) -> &[ResearchDecisionRecord]
Inspect all history, including introduction and revoked decisions.
Sourcepub fn canonical_decision(
&self,
authority: &ResearchAuthority,
subject_kind: ResearchSubjectKind,
subject_uuid: Uuid,
) -> Option<&ResearchDecisionRecord>
pub fn canonical_decision( &self, authority: &ResearchAuthority, subject_kind: ResearchSubjectKind, subject_uuid: Uuid, ) -> Option<&ResearchDecisionRecord>
Latest explicit canonical decision only in the exact requested authority. An integration event, source context, or different community cannot grant it.
Trait Implementations§
Source§impl Clone for ResearchDecisionLedger
impl Clone for ResearchDecisionLedger
Source§impl Debug for ResearchDecisionLedger
impl Debug for ResearchDecisionLedger
Source§impl Default for ResearchDecisionLedger
impl Default for ResearchDecisionLedger
impl Eq for ResearchDecisionLedger
Source§impl PartialEq for ResearchDecisionLedger
impl PartialEq for ResearchDecisionLedger
impl StructuralPartialEq for ResearchDecisionLedger
Auto Trait Implementations§
impl Freeze for ResearchDecisionLedger
impl RefUnwindSafe for ResearchDecisionLedger
impl Send for ResearchDecisionLedger
impl Sync for ResearchDecisionLedger
impl Unpin for ResearchDecisionLedger
impl UnsafeUnpin for ResearchDecisionLedger
impl UnwindSafe for ResearchDecisionLedger
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.