Struct near_jsonrpc_primitives::errors::RpcError [−][src]
pub struct RpcError {
pub error_struct: Option<RpcErrorKind>,
pub code: i64,
pub message: String,
pub data: Option<Value>,
}Expand description
This struct may be returned from JSON RPC server in case of error It is expected that that this struct has impls From<_> all other RPC errors like RpcBlockError
Fields
error_struct: Option<RpcErrorKind>code: i64Deprecated please use the error_struct instead
message: StringDeprecated please use the error_struct instead
data: Option<Value>Deprecated please use the error_struct instead
Implementations
A generic constructor.
Mostly for completeness, doesn’t do anything but filling in the corresponding fields.
Create a parse error.
Helper method to define extract INTERNAL_ERROR in separate RpcErrorKind Returns HANDLER_ERROR if the error is not internal one
Create a method not found error.
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Auto Trait Implementations
impl RefUnwindSafe for RpcError
impl UnwindSafe for RpcError
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more