Skip to main content

EvidenceOutcomeCache

Trait EvidenceOutcomeCache 

Source
pub trait EvidenceOutcomeCache {
    // Required methods
    fn get(
        &self,
        evidence_id: &str,
    ) -> Result<Option<EvidenceOutcomeCacheEntry>, String>;
    fn put(&mut self, entry: EvidenceOutcomeCacheEntry) -> Result<(), String>;
    fn load(&self) -> Result<EvidenceOutcomeCacheArtifact, String>;
}
Expand description

Narrow append/query contract for persisted evidence outcome caches.

Required Methods§

Source

fn get( &self, evidence_id: &str, ) -> Result<Option<EvidenceOutcomeCacheEntry>, String>

Load one cached outcome by evidence id.

§Errors

Returns an error if the backend cannot load the cache.

Source

fn put(&mut self, entry: EvidenceOutcomeCacheEntry) -> Result<(), String>

Persist one cached outcome.

§Errors

Returns an error if the backend cannot persist the cache entry.

Source

fn load(&self) -> Result<EvidenceOutcomeCacheArtifact, String>

Load the full cache artifact.

§Errors

Returns an error if the backend cannot load the cache.

Implementors§