pub trait MidnightSubstrateClientTrait:
Send
+ Sync
+ Clone {
// Required methods
fn get_events_at<'life0, 'async_trait>(
&'life0 self,
block_hash: H256,
) -> Pin<Box<dyn Future<Output = Result<Events<SubstrateConfig>, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_finalized_block<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Block<SubstrateConfig, OnlineClient<SubstrateConfig>>, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Trait for Substrate client implementation
Provides a method to get events from the Substrate client. This trait is implemented for types that can retrieve events from a Substrate-based blockchain.
Required Methods§
Sourcefn get_events_at<'life0, 'async_trait>(
&'life0 self,
block_hash: H256,
) -> Pin<Box<dyn Future<Output = Result<Events<SubstrateConfig>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_events_at<'life0, 'async_trait>(
&'life0 self,
block_hash: H256,
) -> Pin<Box<dyn Future<Output = Result<Events<SubstrateConfig>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_finalized_block<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Block<SubstrateConfig, OnlineClient<SubstrateConfig>>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementations on Foreign Types§
Source§impl SubstrateClientTrait for OnlineClient<SubstrateConfig>
Default implementation for Substrate client trait
impl SubstrateClientTrait for OnlineClient<SubstrateConfig>
Default implementation for Substrate client trait
Provides a default implementation for the Substrate client trait using the OnlineClient from the subxt crate.