risingwave_storage::hummock::block_stream

Trait BlockStream

source
pub trait BlockStream:
    Send
    + Sync
    + 'static {
    // Required methods
    fn next_block<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = HummockResult<Option<BlockHolder>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn next_block_index(&self) -> usize;
}

Required Methods§

source

fn next_block<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = HummockResult<Option<BlockHolder>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Reads the next block from the stream and returns it. Returns None if there are no blocks left to read.

source

fn next_block_index(&self) -> usize

Implementors§