Type Alias reth_network_p2p::error::RequestResult
source · pub type RequestResult<T> = Result<T, RequestError>;
Expand description
Result alias for result of a request.
Aliased Type§
enum RequestResult<T> {
Ok(T),
Err(RequestError),
}
Variants§
Trait Implementations§
source§impl EthResponseValidator for RequestResult<Vec<Header>>
impl EthResponseValidator for RequestResult<Vec<Header>>
source§fn reputation_change_err(&self) -> Option<ReputationChangeKind>
fn reputation_change_err(&self) -> Option<ReputationChangeKind>
RequestError::ChannelClosed
is not possible here since these errors are mapped to
ConnectionDropped
, which will be handled when the dropped connection is cleaned up.
RequestError::ConnectionDropped
should be ignored here because this is already handled
when the dropped connection is handled.
RequestError::UnsupportedCapability
is not used yet because we only support active
session for eth protocol.
source§fn is_likely_bad_headers_response(&self, request: &HeadersRequest) -> bool
fn is_likely_bad_headers_response(&self, request: &HeadersRequest) -> bool
Determine whether the response matches what we requested in
HeadersRequest
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.