[−][src]Struct casbin::DefaultCache
Fields
ttl: Duration
Methods
impl<K, V> 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,
pub fn new(cap: usize) -> DefaultCache<K, V>
[src]
Trait Implementations
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,
Auto Trait Implementations
impl<K, V> RefUnwindSafe for DefaultCache<K, V> where
K: RefUnwindSafe,
V: RefUnwindSafe,
K: RefUnwindSafe,
V: RefUnwindSafe,
impl<K, V> Send for DefaultCache<K, V>
impl<K, V> Sync for DefaultCache<K, V>
impl<K, V> Unpin for DefaultCache<K, V>
impl<K, V> UnwindSafe for DefaultCache<K, V> where
K: RefUnwindSafe,
V: RefUnwindSafe,
K: RefUnwindSafe,
V: RefUnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,