Trait deno_cache::Cache

source ·
pub trait Cache: Clone {
    // Required methods
    fn storage_open<'life0, 'async_trait>(
        &'life0 self,
        cache_name: String
    ) -> Pin<Box<dyn Future<Output = Result<i64, AnyError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn storage_has<'life0, 'async_trait>(
        &'life0 self,
        cache_name: String
    ) -> Pin<Box<dyn Future<Output = Result<bool, AnyError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn storage_delete<'life0, 'async_trait>(
        &'life0 self,
        cache_name: String
    ) -> Pin<Box<dyn Future<Output = Result<bool, AnyError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn put<'life0, 'async_trait>(
        &'life0 self,
        request_response: CachePutRequest
    ) -> Pin<Box<dyn Future<Output = Result<Option<Rc<dyn Resource>>, AnyError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn match<'life0, 'async_trait>(
        &'life0 self,
        request: CacheMatchRequest
    ) -> Pin<Box<dyn Future<Output = Result<Option<(CacheMatchResponseMeta, Option<Rc<dyn Resource>>)>, AnyError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn delete<'life0, 'async_trait>(
        &'life0 self,
        request: CacheDeleteRequest
    ) -> Pin<Box<dyn Future<Output = Result<bool, AnyError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

source

fn storage_open<'life0, 'async_trait>( &'life0 self, cache_name: String ) -> Pin<Box<dyn Future<Output = Result<i64, AnyError>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

source

fn storage_has<'life0, 'async_trait>( &'life0 self, cache_name: String ) -> Pin<Box<dyn Future<Output = Result<bool, AnyError>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

source

fn storage_delete<'life0, 'async_trait>( &'life0 self, cache_name: String ) -> Pin<Box<dyn Future<Output = Result<bool, AnyError>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

source

fn put<'life0, 'async_trait>( &'life0 self, request_response: CachePutRequest ) -> Pin<Box<dyn Future<Output = Result<Option<Rc<dyn Resource>>, AnyError>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

source

fn match<'life0, 'async_trait>( &'life0 self, request: CacheMatchRequest ) -> Pin<Box<dyn Future<Output = Result<Option<(CacheMatchResponseMeta, Option<Rc<dyn Resource>>)>, AnyError>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

source

fn delete<'life0, 'async_trait>( &'life0 self, request: CacheDeleteRequest ) -> Pin<Box<dyn Future<Output = Result<bool, AnyError>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Implementors§