gcache 0.0.1

A cache group to accurate remote data access
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
pub mod file;

use std::future::Future;

use tokio::io::AsyncRead;

pub trait DataSource<K: ?Sized>: Send + Sync {
    type Err: Send;
    type Reader: AsyncRead + Unpin + Send;
    fn get<Q: ?Sized + Sync + AsRef<K>>(
        &self,
        k: &Q,
    ) -> impl Send + Future<Output = Result<Self::Reader, Self::Err>>;
}