Skip to main content

WalObjectIo

Trait WalObjectIo 

Source
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 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;
}
Expand description

Object access of the store, so tests can inject failures.

Required Methods§

Source

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,

Source

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,

Source

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,

Source

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,

Source

fn object_path(&self, object_seq: u64) -> String

Implementors§