autocache 0.2.1

automatic cache management
Documentation
1
2
3
4
5
6
7
use anyhow::Result;
use futures::future::BoxFuture;

pub enum Loader<K, V, E> {
    SingleLoader(Box<dyn Fn(K, E) -> BoxFuture<'static, Result<Option<V>>> + Send + Sync>),
    MultiLoader(Box<dyn Fn(Vec<(K, E)>) -> BoxFuture<'static, Result<Vec<(K, V)>>> + Send + Sync>),
}