Skip to main content

SegmentReader

Trait SegmentReader 

Source
pub trait SegmentReader: Send + Sync {
    // Required method
    fn read_segment<'life0, 'life1, 'async_trait>(
        &'life0 self,
        id: &'life1 BlobId,
    ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, StoreError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Minimal cache-neutral interface for immutable segment reads.

Required Methods§

Source

fn read_segment<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 BlobId, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Reads an immutable segment from authoritative storage.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§