Trait FlushableCache

Source
trait FlushableCache: Send + Sync {
    // Required methods
    fn flush<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn check_circular<'life0, 'life1, 'async_trait>(
        &'life0 self,
        other: &'life1 Arc<dyn FlushableCache>,
    ) -> Pin<Box<dyn Future<Output = bool> + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Internal trait used to implement inter-cache flush dependencies.

Required Methods§

Source

fn flush<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Flush the cache.

Source

fn check_circular<'life0, 'life1, 'async_trait>( &'life0 self, other: &'life1 Arc<dyn FlushableCache>, ) -> Pin<Box<dyn Future<Output = bool> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Check of circular dependencies.

Return true if (and only if) other is already a transitive dependency of self.

Implementors§

Source§

impl<K: Clone + Copy + Debug + PartialEq + Eq + Hash + Send + Sync, V: Send + Sync, B: AsyncLruCacheBackend<Key = K, Value = V>> FlushableCache for AsyncLruCacheInner<K, V, B>