reth_network_p2p::error

Type Alias 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§

§1.0.0

Ok(T)

Contains the success value

§1.0.0

Err(RequestError)

Contains the error value

Trait Implementations§

Source§

impl<H: BlockHeader> EthResponseValidator for RequestResult<Vec<H>>

Source§

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

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.