pub enum FlashbotsMiddlewareError<M: Middleware, S: Signer> {
MissingParameters,
RelayError(RelayError<S>),
MiddlewareError(M::Error),
}Expand description
Errors for the Flashbots middleware.
Variants§
MissingParameters
Some parameters were missing.
For bundle simulation, check that the following are set:
simulation_blocksimulation_timestampblock
For bundle submission, check that the following are set:
block
Additionally, min_timestamp and max_timestamp must
both be set or unset.
RelayError(RelayError<S>)
The relay responded with an error.
MiddlewareError(M::Error)
An error occured in one of the middlewares.
Trait Implementations§
source§impl<M: Debug + Middleware, S: Debug + Signer> Debug for FlashbotsMiddlewareError<M, S>where
M::Error: Debug,
impl<M: Debug + Middleware, S: Debug + Signer> Debug for FlashbotsMiddlewareError<M, S>where M::Error: Debug,
source§impl<M: Middleware, S: Signer> Display for FlashbotsMiddlewareError<M, S>where
RelayError<S>: Display,
impl<M: Middleware, S: Signer> Display for FlashbotsMiddlewareError<M, S>where RelayError<S>: Display,
source§impl<M: Middleware, S: Signer> Error for FlashbotsMiddlewareError<M, S>where
RelayError<S>: Error,
Self: Debug + Display,
impl<M: Middleware, S: Signer> Error for FlashbotsMiddlewareError<M, S>where RelayError<S>: Error, Self: Debug + Display,
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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<M: Middleware, S: Signer> From<RelayError<S>> for FlashbotsMiddlewareError<M, S>
impl<M: Middleware, S: Signer> From<RelayError<S>> for FlashbotsMiddlewareError<M, S>
source§fn from(source: RelayError<S>) -> Self
fn from(source: RelayError<S>) -> Self
Converts to this type from the input type.
source§impl<M: Middleware, S: Signer> MiddlewareError for FlashbotsMiddlewareError<M, S>
impl<M: Middleware, S: Signer> MiddlewareError for FlashbotsMiddlewareError<M, S>
§type Inner = <M as Middleware>::Error
type Inner = <M as Middleware>::Error
The
Inner type is the next lower middleware layer’s error type.source§fn from_err(src: M::Error) -> FlashbotsMiddlewareError<M, S>
fn from_err(src: M::Error) -> FlashbotsMiddlewareError<M, S>
Convert the next lower middleware layer’s error to this layer’s error
source§fn as_inner(&self) -> Option<&Self::Inner>
fn as_inner(&self) -> Option<&Self::Inner>
Attempt to convert this error to the next lower middleware’s error.
Conversion fails if the error is not from an inner layer (i.e. the
error originates at this middleware layer)
§fn as_serde_error(&self) -> Option<&Error>
fn as_serde_error(&self) -> Option<&Error>
Access an underlying
serde_json error (if any) Read more§fn is_serde_error(&self) -> bool
fn is_serde_error(&self) -> bool
Returns
true if the underlying error is a serde_json (de)serialization
error. This method can be used to identify§fn as_provider_error(&self) -> Option<&ProviderError>
fn as_provider_error(&self) -> Option<&ProviderError>
Attempts to access an underlying [
ProviderError], usually by
traversing the entire middleware stack. Access fails if the underlying
error is not a [ProviderError]§fn from_provider_err(p: ProviderError) -> Self
fn from_provider_err(p: ProviderError) -> Self
Convert a [
ProviderError] to this type, by successively wrapping it
in the error types of all lower middleware§fn as_error_response(&self) -> Option<&JsonRpcError>
fn as_error_response(&self) -> Option<&JsonRpcError>
Access an underlying JSON-RPC error (if any) Read more
§fn is_error_response(&self) -> bool
fn is_error_response(&self) -> bool
Returns
true if the underlying error is a JSON-RPC error responseAuto Trait Implementations§
impl<M, S> !RefUnwindSafe for FlashbotsMiddlewareError<M, S>
impl<M, S> Send for FlashbotsMiddlewareError<M, S>
impl<M, S> Sync for FlashbotsMiddlewareError<M, S>
impl<M, S> Unpin for FlashbotsMiddlewareError<M, S>where <M as Middleware>::Error: Unpin, <S as Signer>::Error: Unpin,
impl<M, S> !UnwindSafe for FlashbotsMiddlewareError<M, S>
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