pub trait ReceiptsClient: DownloadClient {
type Receipt: TxReceipt;
type Output: Future<Output = PeerRequestResult<ReceiptsResponse<Self::Receipt>>> + Sync + Send + Unpin;
// Required method
fn get_receipts_with_priority(
&self,
hashes: Vec<B256>,
priority: Priority,
) -> Self::Output;
// Provided method
fn get_receipts(&self, hashes: Vec<B256>) -> Self::Output { ... }
}Expand description
A client capable of downloading block receipts from peers.
Required Associated Types§
Sourcetype Output: Future<Output = PeerRequestResult<ReceiptsResponse<Self::Receipt>>> + Sync + Send + Unpin
type Output: Future<Output = PeerRequestResult<ReceiptsResponse<Self::Receipt>>> + Sync + Send + Unpin
The output of the request future for querying block receipts.
Required Methods§
Sourcefn get_receipts_with_priority(
&self,
hashes: Vec<B256>,
priority: Priority,
) -> Self::Output
fn get_receipts_with_priority( &self, hashes: Vec<B256>, priority: Priority, ) -> Self::Output
Fetches the receipts for the requested block hashes with priority.
Provided Methods§
Sourcefn get_receipts(&self, hashes: Vec<B256>) -> Self::Output
fn get_receipts(&self, hashes: Vec<B256>) -> 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: 'a + ReceiptsClient + ?Sized> ReceiptsClient for &'a Twhere
&'a T: DownloadClient,
impl<'a, T: 'a + ReceiptsClient + ?Sized> ReceiptsClient for &'a Twhere
&'a T: DownloadClient,
Source§impl<T: ReceiptsClient + ?Sized> ReceiptsClient for Arc<T>where
Arc<T>: DownloadClient,
impl<T: ReceiptsClient + ?Sized> ReceiptsClient for Arc<T>where
Arc<T>: DownloadClient,
Source§impl<T: ReceiptsClient + ?Sized> ReceiptsClient for Box<T>where
Box<T>: DownloadClient,
impl<T: ReceiptsClient + ?Sized> ReceiptsClient for Box<T>where
Box<T>: DownloadClient,
Implementors§
Source§impl<A, B> ReceiptsClient for Either<A, B>
impl<A, B> ReceiptsClient for Either<A, B>
type Receipt = <A as ReceiptsClient>::Receipt
type Output = Either<<A as ReceiptsClient>::Output, <B as ReceiptsClient>::Output>
Source§impl<F> ReceiptsClient for TestReceiptsClient<F>
Available on crate features test-utils only.
impl<F> ReceiptsClient for TestReceiptsClient<F>
Available on crate features
test-utils only.