pub struct JsonRpcErrorObject {
pub code: i64,
pub message: String,
pub data: Option<Value>,
}
Expand description
JSON-RPC Error object
Fields§
§code: i64
§message: String
§data: Option<Value>
Implementations§
Source§impl JsonRpcErrorObject
impl JsonRpcErrorObject
pub fn new( code: JsonRpcErrorCode, message: Option<String>, data: Option<Value>, ) -> Self
pub fn parse_error(data: Option<Value>) -> Self
pub fn invalid_request(data: Option<Value>) -> Self
pub fn method_not_found(method: &str) -> Self
pub fn invalid_params(message: &str) -> Self
pub fn internal_error(message: Option<String>) -> Self
pub fn server_error(code: i64, message: &str, data: Option<Value>) -> Self
Trait Implementations§
Source§impl Clone for JsonRpcErrorObject
impl Clone for JsonRpcErrorObject
Source§fn clone(&self) -> JsonRpcErrorObject
fn clone(&self) -> JsonRpcErrorObject
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for JsonRpcErrorObject
impl Debug for JsonRpcErrorObject
Source§impl<'de> Deserialize<'de> for JsonRpcErrorObject
impl<'de> Deserialize<'de> for JsonRpcErrorObject
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 JsonRpcErrorObject
impl RefUnwindSafe for JsonRpcErrorObject
impl Send for JsonRpcErrorObject
impl Sync for JsonRpcErrorObject
impl Unpin for JsonRpcErrorObject
impl UnwindSafe for JsonRpcErrorObject
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