Trait gcache::CacheStore

source ·
pub trait CacheStore<K: ?Sized>: Send + Sync {
    type Err: Send;
    type Reader: AsyncRead + Unpin + Send;

    // Required methods
    fn fill<R>(
        &self,
        k: &K,
        v: &mut R
    ) -> impl Send + Future<Output = Result<(), Self::Err>>
       where R: AsyncRead + Unpin + Send;
    fn get_reader<Q: ?Sized + Sync + AsRef<K>>(
        &self,
        k: &Q,
        offset: u64,
        limit: u64
    ) -> impl Send + Future<Output = Result<Option<Self::Reader>, Self::Err>>;
    fn evict<Q: ?Sized + Sync + AsRef<K>>(
        &self,
        k: &Q
    ) -> impl Send + Future<Output = Result<(), Self::Err>>;
}

Required Associated Types§

Required Methods§

source

fn fill<R>( &self, k: &K, v: &mut R ) -> impl Send + Future<Output = Result<(), Self::Err>>
where R: AsyncRead + Unpin + Send,

source

fn get_reader<Q: ?Sized + Sync + AsRef<K>>( &self, k: &Q, offset: u64, limit: u64 ) -> impl Send + Future<Output = Result<Option<Self::Reader>, Self::Err>>

source

fn evict<Q: ?Sized + Sync + AsRef<K>>( &self, k: &Q ) -> impl Send + Future<Output = Result<(), Self::Err>>

Object Safety§

This trait is not object safe.

Implementors§