Struct solana_jsonrpc_core::types::error::Error [−][src]
Error object as defined in Spec
Fields
code: ErrorCode
Code
message: String
Message
data: Option<Value>
Optional data
Methods
impl Error
[src]
impl Error
pub fn new(code: ErrorCode) -> Self
[src]
pub fn new(code: ErrorCode) -> Self
Wraps given ErrorCode
pub fn parse_error() -> Self
[src]
pub fn parse_error() -> Self
Creates new ParseError
pub fn invalid_request() -> Self
[src]
pub fn invalid_request() -> Self
Creates new InvalidRequest
pub fn method_not_found() -> Self
[src]
pub fn method_not_found() -> Self
Creates new MethodNotFound
pub fn invalid_params<M>(message: M) -> Self where
M: Into<String>,
[src]
pub fn invalid_params<M>(message: M) -> Self where
M: Into<String>,
Creates new InvalidParams
pub fn internal_error() -> Self
[src]
pub fn internal_error() -> Self
Creates new InternalError
pub fn invalid_version() -> Self
[src]
pub fn invalid_version() -> Self
Creates new InvalidRequest
with invalid version description
Trait Implementations
impl Debug for Error
[src]
impl Debug for Error
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PartialEq for Error
[src]
impl PartialEq for Error
fn eq(&self, other: &Error) -> bool
[src]
fn eq(&self, other: &Error) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Error) -> bool
[src]
fn ne(&self, other: &Error) -> bool
This method tests for !=
.
impl Clone for Error
[src]
impl Clone for Error