Trait SnapClient

Source
pub trait SnapClient: DownloadClient {
    type Output: Future<Output = PeerRequestResult<AccountRangeMessage>> + Send + Sync + Unpin;

    // Required method
    fn get_account_range_with_priority(
        &self,
        request: GetAccountRangeMessage,
        priority: Priority,
    ) -> Self::Output;

    // Provided method
    fn get_account_range(&self, request: GetAccountRangeMessage) -> Self::Output { ... }
}
Expand description

The snap sync downloader client

Required Associated Types§

Source

type Output: Future<Output = PeerRequestResult<AccountRangeMessage>> + Send + Sync + Unpin

The output future type for account range requests

Required Methods§

Source

fn get_account_range_with_priority( &self, request: GetAccountRangeMessage, priority: Priority, ) -> Self::Output

Sends the account range request to the p2p network with priority set and returns the account range response received from a peer.

Provided Methods§

Source

fn get_account_range(&self, request: GetAccountRangeMessage) -> Self::Output

Sends the account range request to the p2p network and returns the account range response received from a peer.

Implementations on Foreign Types§

Source§

impl<'a, T: 'a + SnapClient + ?Sized> SnapClient for &'a T

Source§

type Output = <T as SnapClient>::Output

Source§

fn get_account_range(&self, request: GetAccountRangeMessage) -> Self::Output

Source§

fn get_account_range_with_priority( &self, request: GetAccountRangeMessage, priority: Priority, ) -> Self::Output

Source§

impl<T: SnapClient + ?Sized> SnapClient for Box<T>
where Box<T>: DownloadClient,

Source§

type Output = <T as SnapClient>::Output

Source§

fn get_account_range(&self, request: GetAccountRangeMessage) -> Self::Output

Source§

fn get_account_range_with_priority( &self, request: GetAccountRangeMessage, priority: Priority, ) -> Self::Output

Source§

impl<T: SnapClient + ?Sized> SnapClient for Arc<T>
where Arc<T>: DownloadClient,

Source§

type Output = <T as SnapClient>::Output

Source§

fn get_account_range(&self, request: GetAccountRangeMessage) -> Self::Output

Source§

fn get_account_range_with_priority( &self, request: GetAccountRangeMessage, priority: Priority, ) -> Self::Output

Implementors§