[−][src]Enum jrpc::ErrorCode
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
-32700
: Parse error. Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text.
-32600
: Invalid Request. The JSON sent is not a valid Request object.
-32601
: Method not found. The method does not exist / is not available.
-32602
: Invalid params. Invalid method parameter(s).
-32603
: Internal error. Internal JSON-RPC error.
ServerError(i64)
-32000 to -32099
: Server error. Reserved for implementation-defined server-errors.
Methods
impl ErrorCode
[src]
pub fn is_valid(&self) -> bool
[src]
Return whether the ErrorCode is correct.
This will only return false
if this is ServerError
and is outside of the range of -32000
to -32099.
Trait Implementations
impl From<i64> for ErrorCode
[src]
impl Clone for ErrorCode
[src]
impl Copy for ErrorCode
[src]
impl Eq for ErrorCode
[src]
impl Ord for ErrorCode
[src]
fn cmp(&self, other: &ErrorCode) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
1.21.0[src]
fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<ErrorCode> for ErrorCode
[src]
impl PartialOrd<ErrorCode> for ErrorCode
[src]
fn partial_cmp(&self, other: &ErrorCode) -> Option<Ordering>
[src]
fn lt(&self, other: &ErrorCode) -> bool
[src]
fn le(&self, other: &ErrorCode) -> bool
[src]
fn gt(&self, other: &ErrorCode) -> bool
[src]
fn ge(&self, other: &ErrorCode) -> bool
[src]
impl Debug for ErrorCode
[src]
impl Hash for ErrorCode
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Expected for ErrorCode
[src]
impl Serialize for ErrorCode
[src]
impl<'de> Deserialize<'de> for ErrorCode
[src]
fn deserialize<D>(deserializer: D) -> Result<ErrorCode, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
Auto Trait Implementations
impl Send for ErrorCode
impl Sync for ErrorCode
impl Unpin for ErrorCode
impl UnwindSafe for ErrorCode
impl RefUnwindSafe for ErrorCode
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<'de, T> Expected for T where
T: Visitor<'de>,
[src]
T: Visitor<'de>,
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,