pub struct ErrorCode(pub i64);Expand description
JSON-RPC 2.0 standard error codes
Reference: https://www.jsonrpc.org/specification#error_object
Tuple Fields§
§0: i64Implementations§
Source§impl ErrorCode
impl ErrorCode
Sourcepub const PARSE_ERROR: Self
pub const PARSE_ERROR: Self
Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text.
Sourcepub const INVALID_REQUEST: Self
pub const INVALID_REQUEST: Self
The JSON sent is not a valid Request object.
Sourcepub const METHOD_NOT_FOUND: Self
pub const METHOD_NOT_FOUND: Self
The method does not exist / is not available.
Sourcepub const INVALID_PARAMS: Self
pub const INVALID_PARAMS: Self
Invalid method parameter(s).
Sourcepub const INTERNAL_ERROR: Self
pub const INTERNAL_ERROR: Self
Internal JSON-RPC error.
Sourcepub const SERVER_SHUTDOWN: Self
pub const SERVER_SHUTDOWN: Self
Server is shutting down
Sourcepub const TRANSPORT_ERROR: Self
pub const TRANSPORT_ERROR: Self
Transport error
Sourcepub const TIMEOUT_ERROR: Self
pub const TIMEOUT_ERROR: Self
Timeout error
Sourcepub const CAPABILITY_NOT_SUPPORTED: Self
pub const CAPABILITY_NOT_SUPPORTED: Self
Capability not supported
Sourcepub const RESOURCE_NOT_FOUND: Self
pub const RESOURCE_NOT_FOUND: Self
Resource not found
Sourcepub const RESOURCE_EXISTS: Self
pub const RESOURCE_EXISTS: Self
Resource already exists
Sourcepub const PERMISSION_DENIED: Self
pub const PERMISSION_DENIED: Self
Permission denied
Sourcepub const INVALID_STATE: Self
pub const INVALID_STATE: Self
Invalid state for operation
Sourcepub const CALLBACK_ERROR: Self
pub const CALLBACK_ERROR: Self
Callback registration failed
Sourcepub fn is_standard(&self) -> bool
pub fn is_standard(&self) -> bool
Check if this is a standard JSON-RPC error code
Trait Implementations§
impl Copy for ErrorCode
Source§impl<'de> Deserialize<'de> for ErrorCode
impl<'de> Deserialize<'de> for ErrorCode
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
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 UnsafeUnpin 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.