Trait jsonrpc_v2::ErrorLike [−][src]
pub trait ErrorLike: Display { fn code(&self) -> i64 { ... } fn message(&self) -> String { ... } fn data(&self) -> Option<Box<dyn Serialize + Send>> { ... } }
Expand description
Trait that can be used to map custom errors to the Error
object.
Provided methods
fn code(&self) -> i64
[src]
Expand description
Code to be used in JSON-RPC 2.0 Error object. Default is 0.
fn message(&self) -> String
[src]
Expand description
Message to be used in JSON-RPC 2.0 Error object. Default is the Display
value of the item.
fn data(&self) -> Option<Box<dyn Serialize + Send>>
[src]
Expand description
Any additional data to be sent with the error. Default is None
.