[−][src]Trait casbin::Cache
Required methods
fn set_capacity(&mut self, c: usize)
fn set_ttl(&mut self, t: Duration)
#[must_use]fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
k: &'life1 K
) -> Pin<Box<dyn Future<Output = Option<&V>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
&'life0 self,
k: &'life1 K
) -> Pin<Box<dyn Future<Output = Option<&V>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
#[must_use]fn has<'life0, 'life1, 'async_trait>(
&'life0 self,
k: &'life1 K
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
&'life0 self,
k: &'life1 K
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
#[must_use]fn set<'life0, 'async_trait>(
&'life0 mut self,
k: K,
v: V
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
&'life0 mut self,
k: K,
v: V
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
#[must_use]fn clear<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
&'life0 mut self
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Implementors
impl<K, V> Cache<K, V> for DefaultCache<K, V> where
K: Eq + Hash + Send + Sync + 'static,
V: Send + Sync + 'static,
[src]
K: Eq + Hash + Send + Sync + 'static,
V: Send + Sync + 'static,
fn set_capacity(&mut self, cap: usize)
[src]
fn set_ttl(&mut self, ttl: Duration)
[src]
fn get<'a, 'life0, 'async_trait>(
&'a self,
k: &'life0 K
) -> Pin<Box<dyn Future<Output = Option<&'a V>> + Send + 'async_trait>> where
'a: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'a self,
k: &'life0 K
) -> Pin<Box<dyn Future<Output = Option<&'a V>> + Send + 'async_trait>> where
'a: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
fn has<'life0, 'life1, 'async_trait>(
&'life0 self,
k: &'life1 K
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
k: &'life1 K
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn set<'life0, 'async_trait>(
&'life0 mut self,
k: K,
v: V
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
k: K,
v: V
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn clear<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,