Skip to main content

FederationArtifactStore

Trait FederationArtifactStore 

Source
pub trait FederationArtifactStore: Send + Sync {
    // Required methods
    fn put_dual_signed(
        &self,
        id: &str,
        receipt: &DualSignedReceipt,
    ) -> Result<(), KernelError>;
    fn get_dual_signed(
        &self,
        id: &str,
    ) -> Result<Option<DualSignedReceipt>, KernelError>;
    fn put_dsse(
        &self,
        id: &str,
        envelope: &DsseEnvelope,
    ) -> Result<(), KernelError>;
    fn get_dsse(&self, id: &str) -> Result<Option<DsseEnvelope>, KernelError>;

    // Provided method
    fn is_durable(&self) -> bool { ... }
}

Required Methods§

Provided Methods§

Source

fn is_durable(&self) -> bool

Whether a written artifact survives once the kernel’s bounded front caches evict it, so an evicted id is still resolvable through this store. Only a persistent backend (database, object store) whose writes outlive eviction returns true; a bounded, drop-evicting in-memory store returns false because it can evict the same id the front caches did.

The default is false so a store is never assumed durable unless it explicitly guarantees it: treating a bounded cache as durable storage would silently drop bilateral evidence with no operator signal.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§