pub(crate) trait WalObjectIo: Send + Sync {
// Required methods
fn put_if_absent<'life0, 'async_trait>(
&'life0 self,
object_seq: u64,
content: Bytes,
) -> Pin<Box<dyn Future<Output = Result<PutResult>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get<'life0, 'async_trait>(
&'life0 self,
object_seq: u64,
) -> Pin<Box<dyn Future<Output = Result<Bytes>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_range<'life0, 'async_trait>(
&'life0 self,
object_seq: u64,
offset: u64,
len: u64,
) -> Pin<Box<dyn Future<Output = Result<Bytes>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn delete<'life0, 'async_trait>(
&'life0 self,
object_seq: u64,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn list<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<ListedObject>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn object_path(&self, object_seq: u64) -> String;
fn storage(&self) -> String;
// Provided method
fn list_ahead(&self) -> BoxStream<'_, Result<ListedObject>> { ... }
}Expand description
Object access of the store, so tests can inject failures.
Required Methods§
fn put_if_absent<'life0, 'async_trait>(
&'life0 self,
object_seq: u64,
content: Bytes,
) -> Pin<Box<dyn Future<Output = Result<PutResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get<'life0, 'async_trait>(
&'life0 self,
object_seq: u64,
) -> Pin<Box<dyn Future<Output = Result<Bytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_range<'life0, 'async_trait>(
&'life0 self,
object_seq: u64,
offset: u64,
len: u64,
) -> Pin<Box<dyn Future<Output = Result<Bytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete<'life0, 'async_trait>(
&'life0 self,
object_seq: u64,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<ListedObject>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn object_path(&self, object_seq: u64) -> String
Provided Methods§
Sourcefn list_ahead(&self) -> BoxStream<'_, Result<ListedObject>>
fn list_ahead(&self) -> BoxStream<'_, Result<ListedObject>>
See ObjectStoreIo::list_ahead; by default the objects
list returns.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".