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§
Sourcefn 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<'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.
fn next_block_index(&self) -> usize
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".