reth_network_api::downloaders

Trait BlockDownloaderProvider

Source
pub trait BlockDownloaderProvider {
    type Client: BlockClient<Header: Debug, Body: Debug> + Send + Sync + Clone + 'static;

    // Required method
    fn fetch_client(
        &self,
    ) -> impl Future<Output = Result<Self::Client, RecvError>> + Send;
}
Expand description

Provides client for downloading blocks.

Required Associated Types§

Source

type Client: BlockClient<Header: Debug, Body: Debug> + Send + Sync + Clone + 'static

The client this type can provide.

Required Methods§

Source

fn fetch_client( &self, ) -> impl Future<Output = Result<Self::Client, RecvError>> + Send

Returns a new BlockClient, used for fetching blocks from peers.

The client is the entrypoint for sending block requests to the network.

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<'a, T: 'a + BlockDownloaderProvider + ?Sized> BlockDownloaderProvider for &'a T

Source§

type Client = <T as BlockDownloaderProvider>::Client

Source§

fn fetch_client( &self, ) -> impl Future<Output = Result<Self::Client, RecvError>> + Send

Source§

impl<T: BlockDownloaderProvider + ?Sized> BlockDownloaderProvider for Arc<T>

Source§

type Client = <T as BlockDownloaderProvider>::Client

Source§

fn fetch_client( &self, ) -> impl Future<Output = Result<Self::Client, RecvError>> + Send

Implementors§