#[non_exhaustive]pub struct NoopFullBlockClient<Net = EthNetworkPrimitives>(/* private fields */);Expand description
A headers+bodies client implementation that does nothing.
Trait Implementations§
Source§impl<Net> BlockAccessListsClient for NoopFullBlockClient<Net>where
Net: NetworkPrimitives,
impl<Net> BlockAccessListsClient for NoopFullBlockClient<Net>where
Net: NetworkPrimitives,
Source§type Output = Ready<Result<WithPeerId<BlockAccessLists>, RequestError>>
type Output = Ready<Result<WithPeerId<BlockAccessLists>, RequestError>>
Source§fn get_block_access_lists_with_priority_and_requirement(
&self,
_hashes: Vec<B256>,
_priority: Priority,
_requirement: BalRequirement,
) -> Self::Output
fn get_block_access_lists_with_priority_and_requirement( &self, _hashes: Vec<B256>, _priority: Priority, _requirement: BalRequirement, ) -> Self::Output
Source§fn get_block_access_lists(&self, hashes: Vec<B256>) -> Self::Output
fn get_block_access_lists(&self, hashes: Vec<B256>) -> Self::Output
Source§fn get_block_access_lists_with_requirement(
&self,
hashes: Vec<B256>,
requirement: BalRequirement,
) -> Self::Output
fn get_block_access_lists_with_requirement( &self, hashes: Vec<B256>, requirement: BalRequirement, ) -> Self::Output
Source§impl<Net> BlockClient for NoopFullBlockClient<Net>where
Net: NetworkPrimitives,
impl<Net> BlockClient for NoopFullBlockClient<Net>where
Net: NetworkPrimitives,
Source§impl<Net> BodiesClient for NoopFullBlockClient<Net>where
Net: NetworkPrimitives,
Implements the BodiesClient trait for the NoopFullBlockClient struct.
impl<Net> BodiesClient for NoopFullBlockClient<Net>where
Net: NetworkPrimitives,
Implements the BodiesClient trait for the NoopFullBlockClient struct.
Source§type Output = Ready<Result<WithPeerId<Vec<<NoopFullBlockClient<Net> as BodiesClient>::Body>>, RequestError>>
type Output = Ready<Result<WithPeerId<Vec<<NoopFullBlockClient<Net> as BodiesClient>::Body>>, RequestError>>
Defines the output type of the function.
Source§fn get_block_bodies_with_priority_and_range_hint(
&self,
_hashes: Vec<B256>,
_priority: Priority,
_range_hint: Option<RangeInclusive<u64>>,
) -> Self::Output
fn get_block_bodies_with_priority_and_range_hint( &self, _hashes: Vec<B256>, _priority: Priority, _range_hint: Option<RangeInclusive<u64>>, ) -> Self::Output
Retrieves block bodies based on provided hashes and priority.
§Arguments
_hashes- A vector of block hashes (unused in this implementation)._priority- Priority level for block body retrieval (unused in this implementation).
§Returns
A future containing an empty vector of block bodies and a randomly generated PeerId.
Source§fn get_block_bodies(&self, hashes: Vec<B256>) -> Self::Output
fn get_block_bodies(&self, hashes: Vec<B256>) -> Self::Output
Source§fn get_block_bodies_with_priority(
&self,
hashes: Vec<B256>,
priority: Priority,
) -> Self::Output
fn get_block_bodies_with_priority( &self, hashes: Vec<B256>, priority: Priority, ) -> Self::Output
Source§fn get_block_body(&self, hash: B256) -> SingleBodyRequest<Self::Output> ⓘ
fn get_block_body(&self, hash: B256) -> SingleBodyRequest<Self::Output> ⓘ
Source§fn get_block_body_with_priority(
&self,
hash: B256,
priority: Priority,
) -> SingleBodyRequest<Self::Output> ⓘ
fn get_block_body_with_priority( &self, hash: B256, priority: Priority, ) -> SingleBodyRequest<Self::Output> ⓘ
Source§impl<Net: Clone> Clone for NoopFullBlockClient<Net>
impl<Net: Clone> Clone for NoopFullBlockClient<Net>
Source§impl<Net: Debug> Debug for NoopFullBlockClient<Net>
impl<Net: Debug> Debug for NoopFullBlockClient<Net>
Source§impl<Net> Default for NoopFullBlockClient<Net>
impl<Net> Default for NoopFullBlockClient<Net>
Source§impl<Net> DownloadClient for NoopFullBlockClient<Net>
Implements the DownloadClient trait for the NoopFullBlockClient struct.
impl<Net> DownloadClient for NoopFullBlockClient<Net>
Implements the DownloadClient trait for the NoopFullBlockClient struct.
Source§fn report_bad_message(&self, _peer_id: PeerId)
fn report_bad_message(&self, _peer_id: PeerId)
Reports a bad message received from a peer.
§Arguments
_peer_id- Identifier for the peer sending the bad message (unused in this implementation).
Source§fn num_connected_peers(&self) -> usize
fn num_connected_peers(&self) -> usize
Retrieves the number of connected peers.
§Returns
The number of connected peers, which is always zero in this implementation.
Source§impl<Net> HeadersClient for NoopFullBlockClient<Net>where
Net: NetworkPrimitives,
impl<Net> HeadersClient for NoopFullBlockClient<Net>where
Net: NetworkPrimitives,
Source§type Output = Ready<Result<WithPeerId<Vec<<NoopFullBlockClient<Net> as HeadersClient>::Header>>, RequestError>>
type Output = Ready<Result<WithPeerId<Vec<<NoopFullBlockClient<Net> as HeadersClient>::Header>>, RequestError>>
The output type representing a future containing a peer request result with a vector of headers.
Source§fn get_headers_with_priority(
&self,
_request: HeadersRequest,
_priority: Priority,
) -> Self::Output
fn get_headers_with_priority( &self, _request: HeadersRequest, _priority: Priority, ) -> Self::Output
Retrieves headers with a specified priority level.
This implementation does nothing and returns an empty vector of headers.
§Arguments
_request- A request for headers (unused in this implementation)._priority- The priority level for the headers request (unused in this implementation).
§Returns
Always returns a ready future with an empty vector of headers wrapped in a
PeerRequestResult.
Source§fn get_headers(&self, request: HeadersRequest) -> Self::Output
fn get_headers(&self, request: HeadersRequest) -> Self::Output
Source§fn get_header(
&self,
start: BlockHashOrNumber,
) -> SingleHeaderRequest<Self::Output> ⓘ
fn get_header( &self, start: BlockHashOrNumber, ) -> SingleHeaderRequest<Self::Output> ⓘ
Source§fn get_header_with_priority(
&self,
start: BlockHashOrNumber,
priority: Priority,
) -> SingleHeaderRequest<Self::Output> ⓘ
fn get_header_with_priority( &self, start: BlockHashOrNumber, priority: Priority, ) -> SingleHeaderRequest<Self::Output> ⓘ
Source§impl<Net> SnapClient for NoopFullBlockClient<Net>where
Net: NetworkPrimitives,
Fails every snap request with RequestError::UnsupportedCapability, so the noop client can
stand in wherever a SnapClient bound is required but snap is not served.
impl<Net> SnapClient for NoopFullBlockClient<Net>where
Net: NetworkPrimitives,
Fails every snap request with RequestError::UnsupportedCapability, so the noop client can
stand in wherever a SnapClient bound is required but snap is not served.
Source§fn 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
Fails the account range request as unsupported.
Source§fn get_storage_ranges(&self, _request: GetStorageRangesMessage) -> Self::Output
fn get_storage_ranges(&self, _request: GetStorageRangesMessage) -> Self::Output
Fails the storage ranges request as unsupported.
Source§fn 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
Fails the prioritized storage ranges request as unsupported.
Source§fn get_byte_codes(&self, _request: GetByteCodesMessage) -> Self::Output
fn get_byte_codes(&self, _request: GetByteCodesMessage) -> Self::Output
Fails the bytecode request as unsupported.
Source§fn 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
Fails the prioritized bytecode request as unsupported.
Source§fn 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
Fails the block access lists request as unsupported.
Source§type Output = Ready<Result<WithPeerId<SnapResponse>, RequestError>>
type Output = Ready<Result<WithPeerId<SnapResponse>, RequestError>>
Source§fn get_account_range(&self, request: GetAccountRangeMessage) -> Self::Output
fn get_account_range(&self, request: GetAccountRangeMessage) -> Self::Output
Source§fn get_block_access_lists(
&self,
request: GetBlockAccessListsMessage,
) -> Self::Output
fn get_block_access_lists( &self, request: GetBlockAccessListsMessage, ) -> Self::Output
Auto Trait Implementations§
impl<Net> Freeze for NoopFullBlockClient<Net>where
PhantomData<Net>: Freeze,
impl<Net> RefUnwindSafe for NoopFullBlockClient<Net>where
PhantomData<Net>: RefUnwindSafe,
impl<Net> Send for NoopFullBlockClient<Net>where
PhantomData<Net>: Send,
impl<Net> Sync for NoopFullBlockClient<Net>where
PhantomData<Net>: Sync,
impl<Net> Unpin for NoopFullBlockClient<Net>where
PhantomData<Net>: Unpin,
impl<Net> UnsafeUnpin for NoopFullBlockClient<Net>where
PhantomData<Net>: UnsafeUnpin,
impl<Net> UnwindSafe for NoopFullBlockClient<Net>where
PhantomData<Net>: 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> EthBlockClient for Twhere
T: BlockClient<Block = Block<EthereumTxEnvelope<TxEip4844>>>,
§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> ⓘ
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> ⓘ
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: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 0 bytes