Trait salvo_cache::CacheIssuer
source · pub trait CacheIssuer: Send + Sync + 'static {
type Key: Hash + Eq + Send + Sync + 'static;
// Required method
fn issue<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
req: &'life1 mut Request,
depot: &'life2 Depot
) -> Pin<Box<dyn Future<Output = Option<Self::Key>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}Expand description
Issuer
Required Associated Types§
Required Methods§
sourcefn issue<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
req: &'life1 mut Request,
depot: &'life2 Depot
) -> Pin<Box<dyn Future<Output = Option<Self::Key>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn issue<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, req: &'life1 mut Request, depot: &'life2 Depot ) -> Pin<Box<dyn Future<Output = Option<Self::Key>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,
Issue a new key for the request. If it returns None, the request will not be cached.