pub trait CacheSource: Send + Sync {
type Key: Eq + Hash + Clone + Send + Sync;
type Value: Clone + Send + Sync;
// Required method
fn load<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 Self::Key,
) -> Pin<Box<dyn Future<Output = Result<Self::Value>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
Source§impl<P: PolicyStore> CacheSource for P
Every PolicyStore is a CacheSource keyed by AgentId returning a
PolicyDocument, so L1Cache<P> fronts any policy backend directly.
impl<P: PolicyStore> CacheSource for P
Every PolicyStore is a CacheSource keyed by AgentId returning a
PolicyDocument, so L1Cache<P> fronts any policy backend directly.