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