pub trait BlockStore: Send + Sync {
// Required methods
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 BlockKey,
) -> Pin<Box<dyn Future<Output = VfsResult<Vec<u8>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_range<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 BlockKey,
off: u64,
len: u64,
) -> Pin<Box<dyn Future<Output = VfsResult<Vec<u8>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn put<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 BlockKey,
data: &'life2 [u8],
) -> Pin<Box<dyn Future<Output = VfsResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn exists<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 BlockKey,
) -> Pin<Box<dyn Future<Output = VfsResult<bool>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn delete_many<'life0, 'life1, 'async_trait>(
&'life0 self,
keys: &'life1 [BlockKey],
) -> Pin<Box<dyn Future<Output = VfsResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn copy<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
src: &'life1 BlockKey,
dst: &'life2 BlockKey,
) -> Pin<Box<dyn Future<Output = VfsResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}Required Methods§
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 BlockKey,
) -> Pin<Box<dyn Future<Output = VfsResult<Vec<u8>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_range<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 BlockKey,
off: u64,
len: u64,
) -> Pin<Box<dyn Future<Output = VfsResult<Vec<u8>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn put<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 BlockKey,
data: &'life2 [u8],
) -> Pin<Box<dyn Future<Output = VfsResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn exists<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 BlockKey,
) -> Pin<Box<dyn Future<Output = VfsResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_many<'life0, 'life1, 'async_trait>(
&'life0 self,
keys: &'life1 [BlockKey],
) -> Pin<Box<dyn Future<Output = VfsResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn copy<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
src: &'life1 BlockKey,
dst: &'life2 BlockKey,
) -> Pin<Box<dyn Future<Output = VfsResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".