pub(crate) trait MapError<T>: Sized {
// Required method
fn map_error(
self,
code: impl Into<ErrorCode>,
) -> Result<T, ErrorObjectOwned>;
// Provided method
fn map_misc_error(self) -> Result<T, ErrorObjectOwned> { ... }
}
Expand description
A trait for mapping errors to [jsonrpsee_types::ErrorObjectOwned
].
Required Methods§
Provided Methods§
sourcefn map_misc_error(self) -> Result<T, ErrorObjectOwned>
fn map_misc_error(self) -> Result<T, ErrorObjectOwned>
Maps errors to [jsonrpsee_types::ErrorObjectOwned
] with a LegacyCode::Misc
error code.
Object Safety§
This trait is not object safe.