pub struct TestReceiptsClient<F> {
pub responder: F,
}Available on crate features
test-utils only.Expand description
A test client for fetching receipts
Fields§
§responder: FThe function that is called on each receipt request.
Trait Implementations§
Source§impl<F> Debug for TestReceiptsClient<F>
impl<F> Debug for TestReceiptsClient<F>
Source§impl<F: Sync + Send> DownloadClient for TestReceiptsClient<F>
impl<F: Sync + Send> DownloadClient for TestReceiptsClient<F>
Source§fn report_bad_message(&self, _peer_id: PeerId)
fn report_bad_message(&self, _peer_id: PeerId)
Penalize the peer for responding with a message
that violates validation rules
Source§fn num_connected_peers(&self) -> usize
fn num_connected_peers(&self) -> usize
Returns how many peers the network is currently connected to.
Source§impl<F> ReceiptsClient for TestReceiptsClient<F>
impl<F> ReceiptsClient for TestReceiptsClient<F>
Source§type Output = Pin<Box<dyn Future<Output = Result<WithPeerId<ReceiptsResponse<EthereumReceipt>>, RequestError>> + Sync + Send>>
type Output = Pin<Box<dyn Future<Output = Result<WithPeerId<ReceiptsResponse<EthereumReceipt>>, RequestError>> + Sync + Send>>
The output of the request future for querying block receipts.
Source§fn 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.
Source§fn 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.
Auto Trait Implementations§
impl<F> Freeze for TestReceiptsClient<F>where
F: Freeze,
impl<F> RefUnwindSafe for TestReceiptsClient<F>where
F: RefUnwindSafe,
impl<F> Send for TestReceiptsClient<F>where
F: Send,
impl<F> Sync for TestReceiptsClient<F>where
F: Sync,
impl<F> Unpin for TestReceiptsClient<F>where
F: Unpin,
impl<F> UnsafeUnpin for TestReceiptsClient<F>where
F: UnsafeUnpin,
impl<F> UnwindSafe for TestReceiptsClient<F>where
F: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreimpl<T> MaybeDebug for Twhere
T: Debug,
§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
Layout§
Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.