Skip to main content

ReceiptsClient

Trait ReceiptsClient 

Source
pub trait ReceiptsClient: DownloadClient {
    type Receipt: TxReceipt;
    type Output: Future<Output = Result<WithPeerId<ReceiptsResponse<Self::Receipt>>, RequestError>> + Sync + Send + Unpin;

    // Required method
    fn get_receipts_with_priority(
        &self,
        hashes: Vec<FixedBytes<32>>,
        priority: Priority,
    ) -> Self::Output;

    // Provided method
    fn get_receipts(&self, hashes: Vec<FixedBytes<32>>) -> Self::Output { ... }
}
Expand description

A client capable of downloading block receipts from peers.

Required Associated Types§

Source

type Receipt: TxReceipt

The receipt type this client fetches.

Source

type Output: Future<Output = Result<WithPeerId<ReceiptsResponse<Self::Receipt>>, RequestError>> + Sync + Send + Unpin

The output of the request future for querying block receipts.

Required Methods§

Source

fn get_receipts_with_priority( &self, hashes: Vec<FixedBytes<32>>, priority: Priority, ) -> Self::Output

Fetches the receipts for the requested block hashes with priority.

Provided Methods§

Source

fn get_receipts(&self, hashes: Vec<FixedBytes<32>>) -> Self::Output

Fetches the receipts for the requested block hashes.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<'a, T> ReceiptsClient for &'a T

Source§

impl<T> ReceiptsClient for Arc<T>

Source§

impl<T> ReceiptsClient for Box<T>

Implementors§