pub trait LocalCacheStore: Send + Sync {
// Required methods
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
content_hash: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<CachedArtifact>, DaemonError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn put<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
content_hash: &'life1 str,
artifact: &'life2 CachedArtifact,
) -> Pin<Box<dyn Future<Output = Result<(), DaemonError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}Expand description
Abstraction over the node-local content-addressed cache directory.
Content hashes are opaque strings (the same content_hash a
DockerfileGraph node already carries); this trait does not
interpret them beyond using them as a lookup key.
Required Methods§
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
content_hash: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<CachedArtifact>, DaemonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn put<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
content_hash: &'life1 str,
artifact: &'life2 CachedArtifact,
) -> Pin<Box<dyn Future<Output = Result<(), DaemonError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".