pub enum RpcError {
MethodNotFound {
method: String,
},
InvalidParams {
detail: String,
},
Engine {
message: String,
},
Internal {
detail: String,
},
}Expand description
An error that can be serialized into a JSON-RPC "error" object.
Variants§
MethodNotFound
The requested method is not registered in the dispatch table.
InvalidParams
The params object was missing required fields or had the wrong shape for the method.
Engine
The Confium engine returned an error. The message is the
engine’s Display string; the numeric sub-code (if the caller
cares) is logged separately.
Internal
Catch-all for unexpected internal failures.
Implementations§
Trait Implementations§
Source§impl Error for RpcError
impl Error for RpcError
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 ErrorCompat for RpcError
impl ErrorCompat for RpcError
§fn iter_chain(&self) -> ChainCompat<'_, '_>where
Self: AsErrorSource,
fn iter_chain(&self) -> ChainCompat<'_, '_>where
Self: AsErrorSource,
Returns an iterator for traversing the chain of errors,
starting with the current error
and continuing with recursive calls to
Error::source. Read moreSource§impl<__T0> IntoError<RpcError> for MethodNotFoundSnafu<__T0>
impl<__T0> IntoError<RpcError> for MethodNotFoundSnafu<__T0>
Source§impl<__T0> IntoError<RpcError> for InvalidParamsSnafu<__T0>
impl<__T0> IntoError<RpcError> for InvalidParamsSnafu<__T0>
Source§impl<__T0> IntoError<RpcError> for EngineSnafu<__T0>
impl<__T0> IntoError<RpcError> for EngineSnafu<__T0>
Auto Trait Implementations§
impl Freeze for RpcError
impl RefUnwindSafe for RpcError
impl Send for RpcError
impl Sync for RpcError
impl Unpin for RpcError
impl UnsafeUnpin for RpcError
impl UnwindSafe for RpcError
Blanket Implementations§
§impl<T> AsErrorSource for Twhere
T: Error + 'static,
impl<T> AsErrorSource for Twhere
T: Error + 'static,
§fn as_error_source(&self) -> &(dyn Error + 'static)
fn as_error_source(&self) -> &(dyn Error + 'static)
For maximum effectiveness, this needs to be called as a method
to benefit from Rust’s automatic dereferencing of method
receivers.
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