pub struct JsonRpcError {
pub code: i16,
pub message: Option<String>,
}Fields§
§code: i16§message: Option<String>Implementations§
Source§impl JsonRpcError
impl JsonRpcError
pub fn new<T: Display>(code: i16, message: Option<T>) -> Self
pub fn invalid_request<T: Display>(message: T) -> Self
pub fn method_not_found<T: Display>(message: T) -> Self
pub fn invalid_params<T: Display>(message: T) -> Self
pub fn internal_rpc<T: Display>(message: T) -> Self
Trait Implementations§
Source§impl Debug for JsonRpcError
impl Debug for JsonRpcError
Source§impl<'de> Deserialize<'de> for JsonRpcError
impl<'de> Deserialize<'de> for JsonRpcError
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
Source§impl Display for JsonRpcError
impl Display for JsonRpcError
Source§impl From<Error> for JsonRpcError
impl From<Error> for JsonRpcError
Source§impl From<Error> for JsonRpcError
impl From<Error> for JsonRpcError
Source§fn from(e: Error) -> JsonRpcError
fn from(e: Error) -> JsonRpcError
Converts to this type from the input type.
Source§impl From<Error> for JsonRpcError
impl From<Error> for JsonRpcError
Source§fn from(e: Error) -> JsonRpcError
fn from(e: Error) -> JsonRpcError
Converts to this type from the input type.
Source§impl From<Error> for JsonRpcError
impl From<Error> for JsonRpcError
Source§fn from(e: Error) -> JsonRpcError
fn from(e: Error) -> JsonRpcError
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for JsonRpcError
impl RefUnwindSafe for JsonRpcError
impl Send for JsonRpcError
impl Sync for JsonRpcError
impl Unpin for JsonRpcError
impl UnwindSafe for JsonRpcError
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