pub enum ErrorCode {
ParseError,
InvalidRequest,
MethodNotFound,
InvalidParams,
InternalError,
TransactionRejected,
ExecutionError,
ServerError(i64),
}
Expand description
List of JSON-RPC error codes
Variants§
ParseError
Server received Invalid JSON. server side error while parsing JSON
InvalidRequest
send invalid request object.
MethodNotFound
method does not exist or valid
InvalidParams
invalid method parameter.
InternalError
internal call error
TransactionRejected
Failed to send transaction, See also https://github.com/MetaMask/eth-rpc-errors/blob/main/src/error-constants.ts
ExecutionError
Custom geth error code, https://github.com/vapory-legacy/wiki/blob/master/JSON-RPC-Error-Codes-Improvement-Proposal.md
ServerError(i64)
Used for server specific errors.
Implementations§
Trait Implementations§
Source§impl<'a> Deserialize<'a> for ErrorCode
impl<'a> Deserialize<'a> for ErrorCode
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'a>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'a>,
Deserialize this value from the given Serde deserializer. Read more
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 16 bytes
Size for each variant:
ParseError
: 0 bytesInvalidRequest
: 0 bytesMethodNotFound
: 0 bytesInvalidParams
: 0 bytesInternalError
: 0 bytesTransactionRejected
: 0 bytesExecutionError
: 0 bytesServerError
: 8 bytes