#[non_exhaustive]pub enum MethodDispatchError {
UnknownMethod {
method: String,
},
InvalidPayload {
method: String,
source: Error,
},
}Expand description
A failure to select or deserialize a method’s payload.
Callers decide how to report this error. For example, a JSON-RPC runtime can report an invalid request payload as Invalid params, but handle an invalid response payload locally.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
UnknownMethod
The method is unknown or its feature is disabled.
InvalidPayload
The payload could not be deserialized into the selected type.
Trait Implementations§
Source§impl Debug for MethodDispatchError
impl Debug for MethodDispatchError
Source§impl Display for MethodDispatchError
impl Display for MethodDispatchError
Source§impl Error for MethodDispatchError
impl Error for MethodDispatchError
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()
Auto Trait Implementations§
impl !RefUnwindSafe for MethodDispatchError
impl !UnwindSafe for MethodDispatchError
impl Forget for MethodDispatchError
impl Freeze for MethodDispatchError
impl Move for MethodDispatchError
impl Send for MethodDispatchError
impl Sync for MethodDispatchError
impl Unpin for MethodDispatchError
impl UnsafeUnpin for MethodDispatchError
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> IntoMaybeUndefined<T> for T
impl<T> IntoMaybeUndefined<T> for T
Source§fn into_maybe_undefined(self) -> MaybeUndefined<T>
fn into_maybe_undefined(self) -> MaybeUndefined<T>
Converts this value into a three-state builder argument.
Source§impl<T> IntoOption<T> for T
impl<T> IntoOption<T> for T
Source§fn into_option(self) -> Option<T>
fn into_option(self) -> Option<T>
Converts this value into an optional builder argument.