pub trait SnapClient: DownloadClient {
type Output: Future<Output = Result<WithPeerId<SnapResponse>, RequestError>> + Send + Sync + Unpin;
// Required methods
fn get_account_range_with_priority(
&self,
request: GetAccountRangeMessage,
priority: Priority,
) -> Self::Output;
fn get_storage_ranges(
&self,
request: GetStorageRangesMessage,
) -> Self::Output;
fn get_storage_ranges_with_priority(
&self,
request: GetStorageRangesMessage,
priority: Priority,
) -> Self::Output;
fn get_byte_codes(&self, request: GetByteCodesMessage) -> Self::Output;
fn get_byte_codes_with_priority(
&self,
request: GetByteCodesMessage,
priority: Priority,
) -> Self::Output;
fn get_block_access_lists_with_priority(
&self,
request: GetBlockAccessListsMessage,
priority: Priority,
) -> Self::Output;
// Provided methods
fn get_account_range(&self, request: GetAccountRangeMessage) -> Self::Output { ... }
fn get_block_access_lists(
&self,
request: GetBlockAccessListsMessage,
) -> Self::Output { ... }
}network only.Expand description
The snap sync downloader client
Required Associated Types§
Sourcetype Output: Future<Output = Result<WithPeerId<SnapResponse>, RequestError>> + Send + Sync + Unpin
type Output: Future<Output = Result<WithPeerId<SnapResponse>, RequestError>> + Send + Sync + Unpin
The output future type for snap requests
Required Methods§
Sourcefn get_account_range_with_priority(
&self,
request: GetAccountRangeMessage,
priority: Priority,
) -> Self::Output
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.
Sourcefn get_storage_ranges(&self, request: GetStorageRangesMessage) -> Self::Output
fn get_storage_ranges(&self, request: GetStorageRangesMessage) -> Self::Output
Sends the storage ranges request to the p2p network and returns the storage ranges response received from a peer.
Sourcefn get_storage_ranges_with_priority(
&self,
request: GetStorageRangesMessage,
priority: Priority,
) -> Self::Output
fn get_storage_ranges_with_priority( &self, request: GetStorageRangesMessage, priority: Priority, ) -> Self::Output
Sends the storage ranges request to the p2p network with priority set and returns the storage ranges response received from a peer.
Sourcefn get_byte_codes(&self, request: GetByteCodesMessage) -> Self::Output
fn get_byte_codes(&self, request: GetByteCodesMessage) -> Self::Output
Sends the byte codes request to the p2p network and returns the byte codes response received from a peer.
Sourcefn get_byte_codes_with_priority(
&self,
request: GetByteCodesMessage,
priority: Priority,
) -> Self::Output
fn get_byte_codes_with_priority( &self, request: GetByteCodesMessage, priority: Priority, ) -> Self::Output
Sends the byte codes request to the p2p network with priority set and returns the byte codes response received from a peer.
Sourcefn get_block_access_lists_with_priority(
&self,
request: GetBlockAccessListsMessage,
priority: Priority,
) -> Self::Output
fn get_block_access_lists_with_priority( &self, request: GetBlockAccessListsMessage, priority: Priority, ) -> Self::Output
Sends the block access lists request to the p2p network with priority set and returns the block access lists response received from a peer.
Only valid for snap/2 (EIP-8189).
Provided Methods§
Sourcefn get_account_range(&self, request: GetAccountRangeMessage) -> Self::Output
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.
Sourcefn get_block_access_lists(
&self,
request: GetBlockAccessListsMessage,
) -> Self::Output
fn get_block_access_lists( &self, request: GetBlockAccessListsMessage, ) -> Self::Output
Sends the block access lists request to the p2p network and returns the block access lists response received from a peer.
Only valid for snap/2 (EIP-8189).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".