referrerpolicy=no-referrer-when-downgrade
finality_relay

Trait SourceClient

Source
pub trait SourceClient<P: FinalitySyncPipeline>: SourceClientBase<P> {
    // Required methods
    fn best_finalized_block_number<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<P::Number, Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn header_and_finality_proof<'life0, 'async_trait>(
        &'life0 self,
        number: P::Number,
    ) -> Pin<Box<dyn Future<Output = Result<(P::Header, Option<P::FinalityProof>), Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Source client used in finality synchronization loop.

Required Methods§

Source

fn best_finalized_block_number<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<P::Number, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get best finalized block number.

Source

fn header_and_finality_proof<'life0, 'async_trait>( &'life0 self, number: P::Number, ) -> Pin<Box<dyn Future<Output = Result<(P::Header, Option<P::FinalityProof>), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get canonical header and its finality proof by number.

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.

Implementors§