Skip to main content

InvertedIndexReader

Trait InvertedIndexReader 

Source
pub trait InvertedIndexReader: Send + Sync {
    // Required methods
    fn range_read<'a, 'life0, 'async_trait>(
        &'life0 self,
        offset: u64,
        size: u32,
        metrics: Option<&'a mut InvertedIndexReadMetrics>,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'a: 'async_trait,
             'life0: 'async_trait;
    fn read_vec<'a, 'life0, 'life1, 'async_trait>(
        &'life0 self,
        ranges: &'life1 [Range<u64>],
        metrics: Option<&'a mut InvertedIndexReadMetrics>,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Bytes>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'a: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn metadata<'a, 'life0, 'async_trait>(
        &'life0 self,
        metrics: Option<&'a mut InvertedIndexReadMetrics>,
    ) -> Pin<Box<dyn Future<Output = Result<Arc<InvertedIndexMetas>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'a: 'async_trait,
             'life0: 'async_trait;

    // Provided methods
    fn fst<'a, 'life0, 'async_trait>(
        &'life0 self,
        offset: u64,
        size: u32,
        metrics: Option<&'a mut InvertedIndexReadMetrics>,
    ) -> Pin<Box<dyn Future<Output = Result<FstMap>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'a: 'async_trait,
             'life0: 'async_trait { ... }
    fn fst_vec<'a, 'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        ranges: &'life1 [Range<u64>],
        metrics: Option<&'a mut InvertedIndexReadMetrics>,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<FstMap>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'a: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
    fn bitmap<'a, 'life0, 'async_trait>(
        &'life0 self,
        offset: u64,
        size: u32,
        bitmap_type: BitmapType,
        metrics: Option<&'a mut InvertedIndexReadMetrics>,
    ) -> Pin<Box<dyn Future<Output = Result<Bitmap>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'a: 'async_trait,
             'life0: 'async_trait { ... }
    fn bitmap_deque<'a, 'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        ranges: &'life1 [(Range<u64>, BitmapType)],
        metrics: Option<&'a mut InvertedIndexReadMetrics>,
    ) -> Pin<Box<dyn Future<Output = Result<VecDeque<Bitmap>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'a: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
}
Expand description

InvertedIndexReader defines an asynchronous reader of inverted index data

Required Methods§

Source

fn range_read<'a, 'life0, 'async_trait>( &'life0 self, offset: u64, size: u32, metrics: Option<&'a mut InvertedIndexReadMetrics>, ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>
where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait,

Seeks to given offset and reads data with exact size as provided.

Source

fn read_vec<'a, 'life0, 'life1, 'async_trait>( &'life0 self, ranges: &'life1 [Range<u64>], metrics: Option<&'a mut InvertedIndexReadMetrics>, ) -> Pin<Box<dyn Future<Output = Result<Vec<Bytes>>> + Send + 'async_trait>>
where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Reads the bytes in the given ranges.

Source

fn metadata<'a, 'life0, 'async_trait>( &'life0 self, metrics: Option<&'a mut InvertedIndexReadMetrics>, ) -> Pin<Box<dyn Future<Output = Result<Arc<InvertedIndexMetas>>> + Send + 'async_trait>>
where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait,

Retrieves metadata of all inverted indices stored within the blob.

Provided Methods§

Source

fn fst<'a, 'life0, 'async_trait>( &'life0 self, offset: u64, size: u32, metrics: Option<&'a mut InvertedIndexReadMetrics>, ) -> Pin<Box<dyn Future<Output = Result<FstMap>> + Send + 'async_trait>>
where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait,

Retrieves the finite state transducer (FST) map from the given offset and size.

Source

fn fst_vec<'a, 'life0, 'life1, 'async_trait>( &'life0 mut self, ranges: &'life1 [Range<u64>], metrics: Option<&'a mut InvertedIndexReadMetrics>, ) -> Pin<Box<dyn Future<Output = Result<Vec<FstMap>>> + Send + 'async_trait>>
where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Retrieves the multiple finite state transducer (FST) maps from the given ranges.

Source

fn bitmap<'a, 'life0, 'async_trait>( &'life0 self, offset: u64, size: u32, bitmap_type: BitmapType, metrics: Option<&'a mut InvertedIndexReadMetrics>, ) -> Pin<Box<dyn Future<Output = Result<Bitmap>> + Send + 'async_trait>>
where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait,

Retrieves the bitmap from the given offset and size.

Source

fn bitmap_deque<'a, 'life0, 'life1, 'async_trait>( &'life0 mut self, ranges: &'life1 [(Range<u64>, BitmapType)], metrics: Option<&'a mut InvertedIndexReadMetrics>, ) -> Pin<Box<dyn Future<Output = Result<VecDeque<Bitmap>>> + Send + 'async_trait>>
where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Retrieves the multiple bitmaps from the given ranges.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl InvertedIndexReader for MockInvertedIndexReader

InvertedIndexReader defines an asynchronous reader of inverted index data

Source§

impl<R: RangeReader + Sync> InvertedIndexReader for InvertedIndexBlobReader<R>