pub enum DownloadError {
Show 13 variants
HeaderValidation {
hash: B256,
number: u64,
error: Box<ConsensusError>,
},
InvalidTip(GotExpectedBoxed<B256>),
InvalidTipNumber(GotExpected<u64>),
HeadersResponseStartBlockMismatch(GotExpected<u64>),
HeadersResponseTooLong(GotExpected<u64>),
BodyValidation {
hash: B256,
number: u64,
error: Box<ConsensusError>,
},
TooManyBodies(GotExpected<usize>),
MissingHeader {
block_number: BlockNumber,
},
InvalidBodyRange {
range: RangeInclusive<BlockNumber>,
},
Timeout,
EmptyResponse,
RequestError(RequestError),
Provider(ProviderError),
}Expand description
The downloader error type
Variants§
HeaderValidation
Header validation failed.
Fields
hash: B256Hash of header failing validation
InvalidTip(GotExpectedBoxed<B256>)
Received an invalid tip.
InvalidTipNumber(GotExpected<u64>)
Received a tip with an invalid tip number.
HeadersResponseStartBlockMismatch(GotExpected<u64>)
Received a response to a request with unexpected start block
HeadersResponseTooLong(GotExpected<u64>)
Received more headers than requested.
BodyValidation
Block validation failed
Fields
hash: B256Hash of the block failing validation
TooManyBodies(GotExpected<usize>)
Received more bodies than requested.
MissingHeader
Headers missing from the database.
Fields
block_number: BlockNumberMissing header block number.
InvalidBodyRange
Body range invalid
Fields
range: RangeInclusive<BlockNumber>Invalid block number range.
Timeout
Timed out while waiting for request id response.
EmptyResponse
Received empty response while expecting non empty
RequestError(RequestError)
Error while executing the request.
Provider(ProviderError)
Provider error.
Trait Implementations§
Source§impl Clone for DownloadError
impl Clone for DownloadError
Source§impl Debug for DownloadError
impl Debug for DownloadError
Source§impl Display for DownloadError
impl Display for DownloadError
Source§impl Error for DownloadError
impl Error for DownloadError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<DatabaseError> for DownloadError
impl From<DatabaseError> for DownloadError
Source§impl From<ProviderError> for DownloadError
impl From<ProviderError> for DownloadError
Source§impl From<RequestError> for DownloadError
impl From<RequestError> for DownloadError
Source§fn from(error: RequestError) -> Self
fn from(error: RequestError) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for DownloadError
impl !UnwindSafe for DownloadError
impl Freeze for DownloadError
impl Send for DownloadError
impl Sync for DownloadError
impl Unpin for DownloadError
impl UnsafeUnpin for DownloadError
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> 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: 56 bytes
Size for each variant:
HeaderValidation: 55 bytesInvalidTip: 15 bytesInvalidTipNumber: 23 bytesHeadersResponseStartBlockMismatch: 23 bytesHeadersResponseTooLong: 23 bytesBodyValidation: 55 bytesTooManyBodies: 23 bytesMissingHeader: 15 bytesInvalidBodyRange: 31 bytesTimeout: 0 bytesEmptyResponse: 0 bytesRequestError: 1 byteProvider: 55 bytes