mithril_common::cardano_block_scanner

Trait BlockStreamer

source
pub trait BlockStreamer: Sync + Send {
    // Required methods
    fn poll_next<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = StdResult<Option<ChainScannedBlocks>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn last_polled_point(&self) -> Option<RawCardanoPoint>;
}
Expand description

Trait that define how blocks are streamed from a Cardano database

Required Methods§

source

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

Stream the next available blocks

source

fn last_polled_point(&self) -> Option<RawCardanoPoint>

Get the last polled point of the chain

Implementors§