pub struct EvidenceLedger {
pub links: Vec<EvidenceLink>,
}Expand description
Validated immutable evidence participant content.
Fields§
§links: Vec<EvidenceLink>Links ordered by (recorded_at, evidence_uuid).
Implementations§
Source§impl EvidenceLedger
impl EvidenceLedger
Sourcepub fn new(links: Vec<EvidenceLink>) -> Result<Self, KnowledgeError>
pub fn new(links: Vec<EvidenceLink>) -> Result<Self, KnowledgeError>
Validate, sort, and construct evidence content.
Sourcepub fn merge(&self, staged: &Self) -> Result<Self, KnowledgeError>
pub fn merge(&self, staged: &Self) -> Result<Self, KnowledgeError>
Merge staged links idempotently.
Sourcepub fn evidence_fingerprint(
&self,
evidence_uuid: Uuid,
) -> Result<[u8; 32], KnowledgeError>
pub fn evidence_fingerprint( &self, evidence_uuid: Uuid, ) -> Result<[u8; 32], KnowledgeError>
Canonical fingerprint over normalized immutable content.
Sourcepub fn batch(&self) -> Result<RecordBatch, KnowledgeError>
pub fn batch(&self) -> Result<RecordBatch, KnowledgeError>
Build the authoritative evidence Arrow batch.
Sourcepub fn from_batches(batches: &[RecordBatch]) -> Result<Self, KnowledgeError>
pub fn from_batches(batches: &[RecordBatch]) -> Result<Self, KnowledgeError>
Decode authoritative Arrow batches and re-run every invariant.
Trait Implementations§
Source§impl Clone for EvidenceLedger
impl Clone for EvidenceLedger
Source§impl Debug for EvidenceLedger
impl Debug for EvidenceLedger
Source§impl Default for EvidenceLedger
impl Default for EvidenceLedger
Source§impl PartialEq for EvidenceLedger
impl PartialEq for EvidenceLedger
impl StructuralPartialEq for EvidenceLedger
Auto Trait Implementations§
impl Freeze for EvidenceLedger
impl RefUnwindSafe for EvidenceLedger
impl Send for EvidenceLedger
impl Sync for EvidenceLedger
impl Unpin for EvidenceLedger
impl UnsafeUnpin for EvidenceLedger
impl UnwindSafe for EvidenceLedger
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