pub enum ScannerError {
RpcError(Arc<RpcError<TransportErrorKind>>),
BlockNotFound,
Timeout,
BlockExceedsLatest(&'static str, u64, u64),
InvalidEventCount,
InvalidMaxBlockRange,
InvalidBufferCapacity,
InvalidMaxConcurrentFetches,
SubscriptionClosed,
Lagged(u64),
}Expand description
Errors emitted by the scanner.
ScannerError values can be returned by builder connect() methods and are also yielded by
subscription streams (as Err(ScannerError) items).
All errors except ScannerError::Lagged are terminal and will halt further stream processing.
Variants§
RpcError(Arc<RpcError<TransportErrorKind>>)
The underlying RPC transport returned an error.
BlockNotFound
A requested block (by number, hash or tag) could not be retrieved.
Timeout
A timeout elapsed while waiting for an RPC response.
BlockExceedsLatest(&'static str, u64, u64)
A configured block parameter exceeds the latest known block.
InvalidEventCount
The requested event count is invalid (must be greater than zero).
InvalidMaxBlockRange
The configured maximum block range is invalid (must be greater than zero).
InvalidBufferCapacity
The configured stream buffer capacity is invalid (must be greater than zero).
InvalidMaxConcurrentFetches
The configured maximum number of concurrent fetches is invalid (must be greater than zero).
SubscriptionClosed
A block subscription ended (for example, the underlying WebSocket subscription closed).
Lagged(u64)
A subscription consumer could not keep up and some internal messages were skipped.
The contained value is the number of skipped messages reported by the underlying channel. After emitting this error, the subscription stream may continue with newer items.
Trait Implementations§
Source§impl Clone for ScannerError
impl Clone for ScannerError
Source§fn clone(&self) -> ScannerError
fn clone(&self) -> ScannerError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ScannerError
impl Debug for ScannerError
Source§impl Display for ScannerError
impl Display for ScannerError
Source§impl Error for ScannerError
impl Error for ScannerError
1.30.0 · 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
Source§impl From<Error> for ScannerError
impl From<Error> for ScannerError
Source§fn from(error: RobustProviderError) -> ScannerError
fn from(error: RobustProviderError) -> ScannerError
Source§impl From<RpcError<TransportErrorKind>> for ScannerError
impl From<RpcError<TransportErrorKind>> for ScannerError
Source§fn from(error: RpcError<TransportErrorKind>) -> Self
fn from(error: RpcError<TransportErrorKind>) -> Self
Source§impl<T: Clone> PartialEq<ScannerError> for Result<ScannerMessage<T>, ScannerError>
impl<T: Clone> PartialEq<ScannerError> for Result<ScannerMessage<T>, ScannerError>
Auto Trait Implementations§
impl Freeze for ScannerError
impl !RefUnwindSafe for ScannerError
impl Send for ScannerError
impl Sync for ScannerError
impl Unpin for ScannerError
impl UnsafeUnpin for ScannerError
impl !UnwindSafe for ScannerError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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 moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.