pub trait CacheStore<K: ?Sized>: Send + Sync {
type Err: Send;
type Reader: AsyncRead + Unpin + Send;
// Required methods
fn fill<R>(
&self,
k: &K,
v: &mut R,
) -> impl Send + Future<Output = Result<(), Self::Err>>
where R: AsyncRead + Unpin + Send;
fn get_reader<Q: ?Sized + Sync + AsRef<K>>(
&self,
k: &Q,
offset: u64,
limit: u64,
) -> impl Send + Future<Output = Result<Option<Self::Reader>, Self::Err>>;
fn evict<Q: ?Sized + Sync + AsRef<K>>(
&self,
k: &Q,
) -> impl Send + Future<Output = Result<(), Self::Err>>;
}
Required Associated Types§
Required Methods§
fn fill<R>( &self, k: &K, v: &mut R, ) -> impl Send + Future<Output = Result<(), Self::Err>>
fn get_reader<Q: ?Sized + Sync + AsRef<K>>( &self, k: &Q, offset: u64, limit: u64, ) -> impl Send + Future<Output = Result<Option<Self::Reader>, Self::Err>>
fn evict<Q: ?Sized + Sync + AsRef<K>>( &self, k: &Q, ) -> impl Send + Future<Output = Result<(), Self::Err>>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.