Trait BlockBodyIndicesProvider

pub trait BlockBodyIndicesProvider: Send + Sync {
    // Required methods
    fn block_body_indices(
        &self,
        num: u64,
    ) -> Result<Option<StoredBlockBodyIndices>, ProviderError>;
    fn block_body_indices_range(
        &self,
        range: RangeInclusive<u64>,
    ) -> Result<Vec<StoredBlockBodyIndices>, ProviderError>;
}
Expand description

Client trait for fetching block body indices related data.

Required Methods§

fn block_body_indices( &self, num: u64, ) -> Result<Option<StoredBlockBodyIndices>, ProviderError>

Returns the block body indices with matching number from database.

Returns None if block is not found.

fn block_body_indices_range( &self, range: RangeInclusive<u64>, ) -> Result<Vec<StoredBlockBodyIndices>, ProviderError>

Returns the block body indices within the requested range matching number from storage.

Implementations on Foreign Types§

§

impl<'a, T> BlockBodyIndicesProvider for &'a T

§

fn block_body_indices( &self, num: u64, ) -> Result<Option<StoredBlockBodyIndices>, ProviderError>

§

fn block_body_indices_range( &self, range: RangeInclusive<u64>, ) -> Result<Vec<StoredBlockBodyIndices>, ProviderError>

§

impl<T> BlockBodyIndicesProvider for Arc<T>

§

fn block_body_indices( &self, num: u64, ) -> Result<Option<StoredBlockBodyIndices>, ProviderError>

§

fn block_body_indices_range( &self, range: RangeInclusive<u64>, ) -> Result<Vec<StoredBlockBodyIndices>, ProviderError>

Implementors§

§

impl<C, N> BlockBodyIndicesProvider for NoopProvider<C, N>
where C: Send + Sync, N: Send + Sync,

Source§

impl<N: ProviderNodeTypes> BlockBodyIndicesProvider for BlockchainProvider<N>

Source§

impl<N: ProviderNodeTypes> BlockBodyIndicesProvider for ProviderFactory<N>

Source§

impl<N: NodePrimitives> BlockBodyIndicesProvider for StaticFileJarProvider<'_, N>

Source§

impl<N: NodePrimitives> BlockBodyIndicesProvider for StaticFileProvider<N>

Source§

impl<T: NodePrimitives, ChainSpec: Send + Sync> BlockBodyIndicesProvider for MockEthProvider<T, ChainSpec>

Available on crate feature test-utils only.
Source§

impl<TX: DbTx + 'static, N: NodeTypesForProvider> BlockBodyIndicesProvider for DatabaseProvider<TX, N>