pub enum ProviderError {
StarknetError(StarknetError),
RateLimited,
ArrayLengthMismatch,
Other(Box<dyn ProviderImplError>),
}Expand description
Errors using any Provider implementation. This type is deliberately not made generic such
that:
- the
Providertrait itself can be boxed; - error handling is easier.
As a downside, the Other variant contains a boxed implementation-
specific error. It’s generally expected that users of Provider would not need to care about
these errors, but in the case where they do, it’s slightly harder to access than if generics are
used instead.
Variants§
StarknetError(StarknetError)
A Starknet-related error, usually regarding the state or transaction.
RateLimited
The request fails as the client is rate-limited.
ArrayLengthMismatch
When estimating fees for or simulating a single transaction, the server unexpectedly returns data for zero or more than one transactions.
Other(Box<dyn ProviderImplError>)
Boxed implementation-specific errors.
Trait Implementations§
Source§impl Debug for ProviderError
impl Debug for ProviderError
Source§impl Display for ProviderError
impl Display for ProviderError
Source§impl Error for ProviderError
impl Error for ProviderError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<GatewayClientError> for ProviderError
impl From<GatewayClientError> for ProviderError
Source§fn from(value: GatewayClientError) -> Self
fn from(value: GatewayClientError) -> Self
Converts to this type from the input type.
Source§impl<T> From<JsonRpcClientError<T>> for ProviderError
impl<T> From<JsonRpcClientError<T>> for ProviderError
Source§fn from(value: JsonRpcClientError<T>) -> Self
fn from(value: JsonRpcClientError<T>) -> Self
Converts to this type from the input type.
Source§impl From<SequencerError> for ProviderError
impl From<SequencerError> for ProviderError
Source§fn from(value: SequencerError) -> Self
fn from(value: SequencerError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ProviderError
impl !RefUnwindSafe for ProviderError
impl Send for ProviderError
impl Sync for ProviderError
impl Unpin for ProviderError
impl !UnwindSafe for ProviderError
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
Mutably borrows from an owned value. Read more
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> 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.