Skip to main content

ResultCache

Trait ResultCache 

Source
pub trait ResultCache {
    // Required methods
    fn get(
        &self,
        key: &CacheKey,
        check_name: &str,
    ) -> Result<Option<ResultCacheEntry>, ResultCacheError>;
    fn put(&self, entry: &ResultCacheEntry) -> Result<(), ResultCacheError>;
}
Expand description

Lookup and seed a content-addressed result cache.

Required Methods§

Source

fn get( &self, key: &CacheKey, check_name: &str, ) -> Result<Option<ResultCacheEntry>, ResultCacheError>

Load the entry for key + check_name, if a valid one is stored.

Source

fn put(&self, entry: &ResultCacheEntry) -> Result<(), ResultCacheError>

Persist entry under its recorded triple and check name.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§