pub struct Error {
pub code: i32,
pub message: String,
pub data: Option<Value>,
}
Expand description
JSON-RPC protocol error.
Fields§
§code: i32
Error code
message: String
Human-friendly message
data: Option<Value>
Underlying data
Implementations§
Source§impl Error
impl Error
Sourcepub const PARSE_ERROR: i32 = -32_700i32
pub const PARSE_ERROR: i32 = -32_700i32
Protocol level parse error reserved code
Sourcepub const INVALID_REQUEST: i32 = -32_600i32
pub const INVALID_REQUEST: i32 = -32_600i32
Protocol level invalid request reserved code
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Error
impl<'de> Deserialize<'de> for Error
Source§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
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
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