pub struct ArtifactLedger {
pub artifacts: Vec<Artifact>,
}Expand description
Validated immutable Artifact table.
Fields§
§artifacts: Vec<Artifact>Artifacts ordered by (recorded_at, artifact_uuid).
Implementations§
Source§impl ArtifactLedger
impl ArtifactLedger
Sourcepub fn new(artifacts: Vec<Artifact>) -> Result<Self, KnowledgeError>
pub fn new(artifacts: Vec<Artifact>) -> Result<Self, KnowledgeError>
Validate, sort, and construct an Artifact table.
Sourcepub fn merge(&self, staged: &Self) -> Result<Self, KnowledgeError>
pub fn merge(&self, staged: &Self) -> Result<Self, KnowledgeError>
Merge staged rows into an existing ledger.
Sourcepub fn artifact_fingerprint(
&self,
artifact_uuid: Uuid,
) -> Result<[u8; 32], KnowledgeError>
pub fn artifact_fingerprint( &self, artifact_uuid: Uuid, ) -> Result<[u8; 32], KnowledgeError>
Canonical semantic fingerprint over immutable Artifact content, excluding clock fields.
Excludes provenance_uuid and recorded_at_micros so that a retry with the same
semantic content but a different clock value compares equal to the committed row.
Sourcepub fn batch(&self) -> Result<RecordBatch, KnowledgeError>
pub fn batch(&self) -> Result<RecordBatch, KnowledgeError>
Encode the authoritative Arrow batch.
Sourcepub fn from_batches(batches: &[RecordBatch]) -> Result<Self, KnowledgeError>
pub fn from_batches(batches: &[RecordBatch]) -> Result<Self, KnowledgeError>
Decode one or more Arrow batches.
Trait Implementations§
Source§impl Clone for ArtifactLedger
impl Clone for ArtifactLedger
Source§impl Debug for ArtifactLedger
impl Debug for ArtifactLedger
Source§impl Default for ArtifactLedger
impl Default for ArtifactLedger
impl Eq for ArtifactLedger
Source§impl PartialEq for ArtifactLedger
impl PartialEq for ArtifactLedger
impl StructuralPartialEq for ArtifactLedger
Auto Trait Implementations§
impl Freeze for ArtifactLedger
impl RefUnwindSafe for ArtifactLedger
impl Send for ArtifactLedger
impl Sync for ArtifactLedger
impl Unpin for ArtifactLedger
impl UnsafeUnpin for ArtifactLedger
impl UnwindSafe for ArtifactLedger
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.