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>
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>
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
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>
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>
impl<N: ProviderNodeTypes> BlockBodyIndicesProvider for BlockchainProvider<N>
impl<N: ProviderNodeTypes> BlockBodyIndicesProvider for ProviderFactory<N>
impl<N: NodePrimitives> BlockBodyIndicesProvider for StaticFileJarProvider<'_, N>
impl<N: NodePrimitives> BlockBodyIndicesProvider for StaticFileProvider<N>
impl<T: NodePrimitives, ChainSpec: Send + Sync> BlockBodyIndicesProvider for MockEthProvider<T, ChainSpec>
Available on crate feature
test-utils
only.