Struct eth_jsonrpc_lib::Error
source · pub struct Error {
pub code: ErrorCode,
pub message: String,
pub data: Option<Value>,
}Expand description
Error object as defined in Spec
Fields§
§code: ErrorCodeCode
message: StringMessage
data: Option<Value>Optional data
Implementations§
source§impl Error
impl Error
sourcepub fn parse_error() -> Self
pub fn parse_error() -> Self
Creates new ParseError
sourcepub fn invalid_request() -> Self
pub fn invalid_request() -> Self
Creates new InvalidRequest
sourcepub fn method_not_found() -> Self
pub fn method_not_found() -> Self
Creates new MethodNotFound
sourcepub fn invalid_params<M>(message: M) -> Selfwhere
M: Into<String>,
pub fn invalid_params<M>(message: M) -> Selfwhere M: Into<String>,
Creates new InvalidParams
sourcepub fn internal_error() -> Self
pub fn internal_error() -> Self
Creates new InternalError
sourcepub fn invalid_version() -> Self
pub fn invalid_version() -> Self
Creates new InvalidRequest with invalid version description
pub fn server_error<M>(err_code: i64, message: M) -> Selfwhere M: Into<String>,
pub fn parse_error_with_message<M>(message: M) -> Selfwhere M: Into<String>,
sourcepub fn invalid_params_len() -> Self
pub fn invalid_params_len() -> Self
Creates new InvalidParams
pub fn query_error() -> Self
pub fn tx_auth_error() -> Self
pub fn time_out() -> Self
pub fn wrap_type_error() -> Self
pub fn grpc_error() -> Self
Trait Implementations§
source§impl<'de> Deserialize<'de> for Error
impl<'de> Deserialize<'de> for Error
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
source§impl From<Error> for RpcFailure
impl From<Error> for RpcFailure
source§impl PartialEq for Error
impl PartialEq for Error
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
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<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request