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>;
}
Available on crate feature
provider
only.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.