Skip to main content

BlockHandler

Trait BlockHandler 

Source
pub trait BlockHandler: Send + Sync {
    // Required method
    fn handle_block<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        block: &'life1 BlockSummary,
        ctx: &'life2 IndexContext,
    ) -> Pin<Box<dyn Future<Output = Result<(), IndexerError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
}
Expand description

Trait for user-provided block handlers.

Called once per block regardless of events.

Required Methods§

Source

fn handle_block<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, block: &'life1 BlockSummary, ctx: &'life2 IndexContext, ) -> Pin<Box<dyn Future<Output = Result<(), IndexerError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Implementors§