Trait GetOrRefreshExt

Source
pub trait GetOrRefreshExt {
    // Required method
    fn get_or_refresh<'a, 'life0, 'async_trait, V, F, Fut>(
        self,
        key: &'life0 str,
        data_loader: F,
        expire_seconds: usize,
    ) -> Pin<Box<dyn Future<Output = Result<V>> + Send + 'async_trait>>
       where V: FromRedisValue + ToRedisArgs + Send + Sync + 'static + 'async_trait,
             F: FnOnce() -> Fut + Send + 'static + 'async_trait,
             Fut: Future<Output = Result<V>> + Send + 'async_trait,
             Self: 'async_trait,
             'a: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

Source

fn get_or_refresh<'a, 'life0, 'async_trait, V, F, Fut>( self, key: &'life0 str, data_loader: F, expire_seconds: usize, ) -> Pin<Box<dyn Future<Output = Result<V>> + Send + 'async_trait>>
where V: FromRedisValue + ToRedisArgs + Send + Sync + 'static + 'async_trait, F: FnOnce() -> Fut + Send + 'static + 'async_trait, Fut: Future<Output = Result<V>> + Send + 'async_trait, Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§