[−][src]Trait cached::CachedAsync
Required methods
#[must_use]pub fn get_or_set_with<'life0, 'async_trait, F, Fut>(
&'life0 mut self,
k: K,
f: F
) -> Pin<Box<dyn Future<Output = &mut V> + Send + 'async_trait>> where
V: Send,
F: FnOnce() -> Fut + Send,
Fut: Future<Output = V> + Send,
F: 'async_trait,
Fut: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
k: K,
f: F
) -> Pin<Box<dyn Future<Output = &mut V> + Send + 'async_trait>> where
V: Send,
F: FnOnce() -> Fut + Send,
Fut: Future<Output = V> + Send,
F: 'async_trait,
Fut: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
#[must_use]pub fn try_get_or_set_with<'life0, 'async_trait, F, Fut, E>(
&'life0 mut self,
k: K,
f: F
) -> Pin<Box<dyn Future<Output = Result<&mut V, E>> + Send + 'async_trait>> where
V: Send,
F: FnOnce() -> Fut + Send,
Fut: Future<Output = Result<V, E>> + Send,
F: 'async_trait,
Fut: 'async_trait,
E: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
k: K,
f: F
) -> Pin<Box<dyn Future<Output = Result<&mut V, E>> + Send + 'async_trait>> where
V: Send,
F: FnOnce() -> Fut + Send,
Fut: Future<Output = Result<V, E>> + Send,
F: 'async_trait,
Fut: 'async_trait,
E: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
Implementations on Foreign Types
impl<K, V> CachedAsync<K, V> for HashMap<K, V> where
K: Hash + Eq + Clone + Send,
[src]
K: Hash + Eq + Clone + Send,
pub fn get_or_set_with<'life0, 'async_trait, F, Fut>(
&'life0 mut self,
k: K,
f: F
) -> Pin<Box<dyn Future<Output = &mut V> + Send + 'async_trait>> where
V: Send,
F: FnOnce() -> Fut + Send,
Fut: Future<Output = V> + Send,
F: 'async_trait,
Fut: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
k: K,
f: F
) -> Pin<Box<dyn Future<Output = &mut V> + Send + 'async_trait>> where
V: Send,
F: FnOnce() -> Fut + Send,
Fut: Future<Output = V> + Send,
F: 'async_trait,
Fut: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
pub fn try_get_or_set_with<'life0, 'async_trait, F, Fut, E>(
&'life0 mut self,
k: K,
f: F
) -> Pin<Box<dyn Future<Output = Result<&mut V, E>> + Send + 'async_trait>> where
V: Send,
F: FnOnce() -> Fut + Send,
Fut: Future<Output = Result<V, E>> + Send,
F: 'async_trait,
Fut: 'async_trait,
E: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
k: K,
f: F
) -> Pin<Box<dyn Future<Output = Result<&mut V, E>> + Send + 'async_trait>> where
V: Send,
F: FnOnce() -> Fut + Send,
Fut: Future<Output = Result<V, E>> + Send,
F: 'async_trait,
Fut: 'async_trait,
E: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
Implementors
impl<K, V> CachedAsync<K, V> for SizedCache<K, V> where
K: Hash + Eq + Clone + Send,
[src]
K: Hash + Eq + Clone + Send,
pub fn get_or_set_with<'life0, 'async_trait, F, Fut>(
&'life0 mut self,
k: K,
f: F
) -> Pin<Box<dyn Future<Output = &mut V> + Send + 'async_trait>> where
V: Send,
F: FnOnce() -> Fut + Send,
Fut: Future<Output = V> + Send,
F: 'async_trait,
Fut: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
k: K,
f: F
) -> Pin<Box<dyn Future<Output = &mut V> + Send + 'async_trait>> where
V: Send,
F: FnOnce() -> Fut + Send,
Fut: Future<Output = V> + Send,
F: 'async_trait,
Fut: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
pub fn try_get_or_set_with<'life0, 'async_trait, F, Fut, E>(
&'life0 mut self,
k: K,
f: F
) -> Pin<Box<dyn Future<Output = Result<&mut V, E>> + Send + 'async_trait>> where
V: Send,
F: FnOnce() -> Fut + Send,
Fut: Future<Output = Result<V, E>> + Send,
F: 'async_trait,
Fut: 'async_trait,
E: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
k: K,
f: F
) -> Pin<Box<dyn Future<Output = Result<&mut V, E>> + Send + 'async_trait>> where
V: Send,
F: FnOnce() -> Fut + Send,
Fut: Future<Output = Result<V, E>> + Send,
F: 'async_trait,
Fut: 'async_trait,
E: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
impl<K, V> CachedAsync<K, V> for TimedCache<K, V> where
K: Hash + Eq + Clone + Send,
[src]
K: Hash + Eq + Clone + Send,
pub fn get_or_set_with<'life0, 'async_trait, F, Fut>(
&'life0 mut self,
k: K,
f: F
) -> Pin<Box<dyn Future<Output = &mut V> + Send + 'async_trait>> where
V: Send,
F: FnOnce() -> Fut + Send,
Fut: Future<Output = V> + Send,
F: 'async_trait,
Fut: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
k: K,
f: F
) -> Pin<Box<dyn Future<Output = &mut V> + Send + 'async_trait>> where
V: Send,
F: FnOnce() -> Fut + Send,
Fut: Future<Output = V> + Send,
F: 'async_trait,
Fut: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
pub fn try_get_or_set_with<'life0, 'async_trait, F, Fut, E>(
&'life0 mut self,
k: K,
f: F
) -> Pin<Box<dyn Future<Output = Result<&mut V, E>> + Send + 'async_trait>> where
V: Send,
F: FnOnce() -> Fut + Send,
Fut: Future<Output = Result<V, E>> + Send,
F: 'async_trait,
Fut: 'async_trait,
E: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
k: K,
f: F
) -> Pin<Box<dyn Future<Output = Result<&mut V, E>> + Send + 'async_trait>> where
V: Send,
F: FnOnce() -> Fut + Send,
Fut: Future<Output = Result<V, E>> + Send,
F: 'async_trait,
Fut: 'async_trait,
E: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
impl<K, V> CachedAsync<K, V> for TimedSizedCache<K, V> where
K: Hash + Eq + Clone + Send,
[src]
K: Hash + Eq + Clone + Send,
pub fn get_or_set_with<'life0, 'async_trait, F, Fut>(
&'life0 mut self,
key: K,
f: F
) -> Pin<Box<dyn Future<Output = &mut V> + Send + 'async_trait>> where
V: Send,
F: FnOnce() -> Fut + Send,
Fut: Future<Output = V> + Send,
F: 'async_trait,
Fut: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
key: K,
f: F
) -> Pin<Box<dyn Future<Output = &mut V> + Send + 'async_trait>> where
V: Send,
F: FnOnce() -> Fut + Send,
Fut: Future<Output = V> + Send,
F: 'async_trait,
Fut: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
pub fn try_get_or_set_with<'life0, 'async_trait, F, Fut, E>(
&'life0 mut self,
key: K,
f: F
) -> Pin<Box<dyn Future<Output = Result<&mut V, E>> + Send + 'async_trait>> where
V: Send,
F: FnOnce() -> Fut + Send,
Fut: Future<Output = Result<V, E>> + Send,
F: 'async_trait,
Fut: 'async_trait,
E: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
key: K,
f: F
) -> Pin<Box<dyn Future<Output = Result<&mut V, E>> + Send + 'async_trait>> where
V: Send,
F: FnOnce() -> Fut + Send,
Fut: Future<Output = Result<V, E>> + Send,
F: 'async_trait,
Fut: 'async_trait,
E: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
impl<K, V> CachedAsync<K, V> for UnboundCache<K, V> where
K: Hash + Eq + Clone + Send,
[src]
K: Hash + Eq + Clone + Send,
pub fn get_or_set_with<'life0, 'async_trait, F, Fut>(
&'life0 mut self,
key: K,
f: F
) -> Pin<Box<dyn Future<Output = &mut V> + Send + 'async_trait>> where
V: Send,
F: FnOnce() -> Fut + Send,
Fut: Future<Output = V> + Send,
F: 'async_trait,
Fut: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
key: K,
f: F
) -> Pin<Box<dyn Future<Output = &mut V> + Send + 'async_trait>> where
V: Send,
F: FnOnce() -> Fut + Send,
Fut: Future<Output = V> + Send,
F: 'async_trait,
Fut: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
pub fn try_get_or_set_with<'life0, 'async_trait, F, Fut, E>(
&'life0 mut self,
key: K,
f: F
) -> Pin<Box<dyn Future<Output = Result<&mut V, E>> + Send + 'async_trait>> where
V: Send,
F: FnOnce() -> Fut + Send,
Fut: Future<Output = Result<V, E>> + Send,
F: 'async_trait,
Fut: 'async_trait,
E: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
key: K,
f: F
) -> Pin<Box<dyn Future<Output = Result<&mut V, E>> + Send + 'async_trait>> where
V: Send,
F: FnOnce() -> Fut + Send,
Fut: Future<Output = Result<V, E>> + Send,
F: 'async_trait,
Fut: 'async_trait,
E: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,