Skip to main content

AsyncReconstructionCache

Trait AsyncReconstructionCache 

Source
pub trait AsyncReconstructionCache: Send + Sync {
    // Required methods
    fn ready(&self) -> ReconstructionCacheFuture<'_, ()>;
    fn get<'operation>(
        &'operation self,
        key: &'operation ReconstructionCacheKey,
    ) -> ReconstructionCacheFuture<'operation, Option<Vec<u8>>>;
    fn put<'operation>(
        &'operation self,
        key: &'operation ReconstructionCacheKey,
        payload: &'operation [u8],
    ) -> ReconstructionCacheFuture<'operation, ()>;
    fn delete<'operation>(
        &'operation self,
        key: &'operation ReconstructionCacheKey,
    ) -> ReconstructionCacheFuture<'operation, bool>;
}
Expand description

Asynchronous reconstruction-cache adapter contract.

Required Methods§

Source

fn ready(&self) -> ReconstructionCacheFuture<'_, ()>

Verifies that the adapter is configured correctly and can serve requests.

Source

fn get<'operation>( &'operation self, key: &'operation ReconstructionCacheKey, ) -> ReconstructionCacheFuture<'operation, Option<Vec<u8>>>

Loads one cached reconstruction payload.

Source

fn put<'operation>( &'operation self, key: &'operation ReconstructionCacheKey, payload: &'operation [u8], ) -> ReconstructionCacheFuture<'operation, ()>

Stores one reconstruction payload.

Source

fn delete<'operation>( &'operation self, key: &'operation ReconstructionCacheKey, ) -> ReconstructionCacheFuture<'operation, bool>

Deletes one cached reconstruction payload.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§