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§
Sourcefn ready(&self) -> ReconstructionCacheFuture<'_, ()>
fn ready(&self) -> ReconstructionCacheFuture<'_, ()>
Verifies that the adapter is configured correctly and can serve requests.
Sourcefn get<'operation>(
&'operation self,
key: &'operation ReconstructionCacheKey,
) -> ReconstructionCacheFuture<'operation, Option<Vec<u8>>>
fn get<'operation>( &'operation self, key: &'operation ReconstructionCacheKey, ) -> ReconstructionCacheFuture<'operation, Option<Vec<u8>>>
Loads one cached reconstruction payload.
Sourcefn put<'operation>(
&'operation self,
key: &'operation ReconstructionCacheKey,
payload: &'operation [u8],
) -> ReconstructionCacheFuture<'operation, ()>
fn put<'operation>( &'operation self, key: &'operation ReconstructionCacheKey, payload: &'operation [u8], ) -> ReconstructionCacheFuture<'operation, ()>
Stores one reconstruction payload.
Sourcefn delete<'operation>(
&'operation self,
key: &'operation ReconstructionCacheKey,
) -> ReconstructionCacheFuture<'operation, bool>
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".