pub struct ResearchSuppressionLedger { /* private fields */ }Expand description
Frozen suppression history, independent of supported/canonical status.
Implementations§
Source§impl ResearchSuppressionLedger
impl ResearchSuppressionLedger
Sourcepub fn new(
events: Vec<ResearchSuppressionRecord>,
) -> Result<Self, KnowledgeError>
pub fn new( events: Vec<ResearchSuppressionRecord>, ) -> Result<Self, KnowledgeError>
Validate exact immutable event identities and deterministic ordering.
Sourcepub fn merge(&self, staged: &Self) -> Result<Self, KnowledgeError>
pub fn merge(&self, staged: &Self) -> Result<Self, KnowledgeError>
Merge selected histories without rewriting an existing event.
Sourcepub fn events(&self) -> &[ResearchSuppressionRecord]
pub fn events(&self) -> &[ResearchSuppressionRecord]
Inspect retained history including inherited events.
Sourcepub fn is_suppressed(&self, assertion: Uuid, contexts: &HashSet<Uuid>) -> bool
pub fn is_suppressed(&self, assertion: Uuid, contexts: &HashSet<Uuid>) -> bool
Suppression in the exact context or its frozen inherited context chain.
Sourcepub fn batch(&self) -> Result<RecordBatch, KnowledgeError>
pub fn batch(&self) -> Result<RecordBatch, KnowledgeError>
Encode typed scope events as Arrow.
Sourcepub fn from_batches(batches: &[RecordBatch]) -> Result<Self, KnowledgeError>
pub fn from_batches(batches: &[RecordBatch]) -> Result<Self, KnowledgeError>
Decode bounded immutable scope events.
Trait Implementations§
Source§impl Clone for ResearchSuppressionLedger
impl Clone for ResearchSuppressionLedger
Source§impl Debug for ResearchSuppressionLedger
impl Debug for ResearchSuppressionLedger
Source§impl Default for ResearchSuppressionLedger
impl Default for ResearchSuppressionLedger
impl Eq for ResearchSuppressionLedger
impl StructuralPartialEq for ResearchSuppressionLedger
Auto Trait Implementations§
impl Freeze for ResearchSuppressionLedger
impl RefUnwindSafe for ResearchSuppressionLedger
impl Send for ResearchSuppressionLedger
impl Sync for ResearchSuppressionLedger
impl Unpin for ResearchSuppressionLedger
impl UnsafeUnpin for ResearchSuppressionLedger
impl UnwindSafe for ResearchSuppressionLedger
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.