pub enum ErrorCode {
ParseError,
InvalidRequest,
MethodNotFound,
InvalidParams,
InternalError,
ServerError(i64),
}
Expand description
Standard JSON-RPC 2.0 error codes
This enum represents the predefined error codes as specified in the JSON-RPC 2.0 specification, along with support for custom server error codes.
Variants§
ParseError
Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text. Error code: -32700
InvalidRequest
The JSON sent is not a valid Request object. Error code: -32600
MethodNotFound
The method does not exist / is not available. Error code: -32601
InvalidParams
Invalid method parameter(s). Error code: -32602
InternalError
Internal JSON-RPC error. Error code: -32603
ServerError(i64)
Reserved for implementation-defined server-errors.
Error codes from -32000 to -32099 are reserved for implementation-defined server-errors.
The i64
value represents the custom error code.
Implementations§
Source§impl ErrorCode
impl ErrorCode
Trait Implementations§
impl Eq for ErrorCode
impl StructuralPartialEq for ErrorCode
Auto Trait Implementations§
impl Freeze for ErrorCode
impl RefUnwindSafe for ErrorCode
impl Send for ErrorCode
impl Sync for ErrorCode
impl Unpin for ErrorCode
impl UnwindSafe for ErrorCode
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