pub trait BlockInfoProvider: Send + Sync {
// Required methods
fn update_latest<'life0, 'async_trait>(
&'life0 self,
block: SubstrateBlock,
subscription_type: SubscriptionType,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn latest_finalized_block<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Arc<SubstrateBlock>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn latest_block<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Arc<SubstrateBlock>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn block_by_number<'life0, 'async_trait>(
&'life0 self,
block_number: SubstrateBlockNumber,
) -> Pin<Box<dyn Future<Output = Result<Option<Arc<SubstrateBlock>>, ClientError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn block_by_hash<'life0, 'life1, 'async_trait>(
&'life0 self,
hash: &'life1 H256,
) -> Pin<Box<dyn Future<Output = Result<Option<Arc<SubstrateBlock>>, ClientError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
// Provided method
fn latest_block_number<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = SubstrateBlockNumber> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
}
Expand description
BlockInfoProvider cache and retrieves information about blocks.
Required Methods§
Sourcefn update_latest<'life0, 'async_trait>(
&'life0 self,
block: SubstrateBlock,
subscription_type: SubscriptionType,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn update_latest<'life0, 'async_trait>(
&'life0 self,
block: SubstrateBlock,
subscription_type: SubscriptionType,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Update the latest block
Sourcefn latest_finalized_block<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Arc<SubstrateBlock>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn latest_finalized_block<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Arc<SubstrateBlock>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Return the latest finalized block.
Sourcefn latest_block<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Arc<SubstrateBlock>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn latest_block<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Arc<SubstrateBlock>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Return the latest block.
Sourcefn block_by_number<'life0, 'async_trait>(
&'life0 self,
block_number: SubstrateBlockNumber,
) -> Pin<Box<dyn Future<Output = Result<Option<Arc<SubstrateBlock>>, ClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn block_by_number<'life0, 'async_trait>(
&'life0 self,
block_number: SubstrateBlockNumber,
) -> Pin<Box<dyn Future<Output = Result<Option<Arc<SubstrateBlock>>, ClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get block by block_number.
Sourcefn block_by_hash<'life0, 'life1, 'async_trait>(
&'life0 self,
hash: &'life1 H256,
) -> Pin<Box<dyn Future<Output = Result<Option<Arc<SubstrateBlock>>, ClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn block_by_hash<'life0, 'life1, 'async_trait>(
&'life0 self,
hash: &'life1 H256,
) -> Pin<Box<dyn Future<Output = Result<Option<Arc<SubstrateBlock>>, ClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get block by block hash.
Provided Methods§
Sourcefn latest_block_number<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = SubstrateBlockNumber> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn latest_block_number<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = SubstrateBlockNumber> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Return the latest block number