Skip to main content

BlockBodyIndicesProvider

Trait BlockBodyIndicesProvider 

Source
pub trait BlockBodyIndicesProvider: Send {
    // 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§

Source

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.

Source

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.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

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

Source§

impl<T> BlockBodyIndicesProvider for Arc<T>

Implementors§

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Available on crate features test-utils only.
Source§

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