#[non_exhaustive]#[repr(i32)]pub enum ErrorCode {
ParseError = -32_700,
InvalidRequest = -32_600,
MethodNotFound = -32_601,
InvalidParams = -32_602,
InternalError = -32_603,
UnknownError = -32_999,
}
Expand description
Error codes defined by the JSON-RPC 2.0 spec: https://www.jsonrpc.org/specification#error_object
Non-exhaustive, additional types for server-specific codes may be defined in the future.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
ParseError = -32_700
A parsing error occurred.
InvalidRequest = -32_600
An invalid request was made.
MethodNotFound = -32_601
Method is not supported by the server.
InvalidParams = -32_602
Invalid request parameters.
InternalError = -32_603
Internal server error occurred.
UnknownError = -32_999
Unknown error occured.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ErrorCode
impl<'de> Deserialize<'de> for ErrorCode
Source§fn deserialize<D>(deserializer: D) -> Result<ErrorCode, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<ErrorCode, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Copy 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