Trait ExplorerAPIError

Source
pub trait ExplorerAPIError: Display + Debug {
    // Required method
    fn code(&self) -> &str;
}
Expand description

ExplorerAPIError is a trait that represents an error that can be returned returned from the ExplorerAPI for various reasons.

It aims to be Serializable for the purposes of conveying the error to the client.

Required Methods§

Source

fn code(&self) -> &str

The code for this error will uniquely identify this specific error.

This value SHOULD match the rename field for the serde tag, if applicable.

Trait Implementations§

Source§

impl Error for dyn ExplorerAPIError

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more

Implementors§