pub enum ErrorCode {
ParseError,
InvalidRequest,
MethodNotFound,
InvalidParams,
InternalError,
ServerError(i64),
}
Expand description
A Number that indicates the error type that occurred. This MUST be an integer.
The error codes from and including -32768 to -32000 are reserved for pre-defined errors. Any code within this range, but not defined explicitly below is reserved for future use. The error codes are nearly the same as those suggested for XML-RPC at the following url: http://xmlrpc-epi.sourceforge.net/specs/rfc.fault_codes.php
Use the is_valid()
method to determine compliance.
Variants§
ParseError
-32700
: Parse error. Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text.
InvalidRequest
-32600
: Invalid Request. The JSON sent is not a valid Request object.
MethodNotFound
-32601
: Method not found. The method does not exist / is not available.
InvalidParams
-32602
: Invalid params. Invalid method parameter(s).
InternalError
-32603
: Internal error. Internal JSON-RPC error.
ServerError(i64)
-32000 to -32099
: Server error. Reserved for implementation-defined server-errors.
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
Source§impl Ord for ErrorCode
impl Ord for ErrorCode
Source§impl PartialOrd for ErrorCode
impl PartialOrd for ErrorCode
impl Copy for ErrorCode
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