Skip to content

Commit

Permalink
fir more doc links
Browse files Browse the repository at this point in the history
  • Loading branch information
oxarbitrage committed Dec 18, 2024
1 parent 2ce93ce commit 7418db4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions zebra-rpc/src/server/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@ impl From<LegacyCode> for i32 {
}
}

/// A trait for mapping errors to [`jsonrpc_core::Error`].
/// A trait for mapping errors to [`jsonrpsee_types::ErrorObjectOwned`].
pub(crate) trait MapError<T>: Sized {
/// Maps errors to [`jsonrpc_core::Error`] with a specific error code.
/// Maps errors to [`jsonrpsee_types::ErrorObjectOwned`] with a specific error code.
fn map_error(self, code: impl Into<ErrorCode>) -> std::result::Result<T, ErrorObjectOwned>;

/// Maps errors to [`jsonrpc_core::Error`] with a [`LegacyCode::Misc`] error code.
/// Maps errors to [`jsonrpsee_types::ErrorObjectOwned`] with a [`LegacyCode::Misc`] error code.
fn map_misc_error(self) -> std::result::Result<T, ErrorObjectOwned> {
self.map_error(LegacyCode::Misc)
}
Expand Down

0 comments on commit 7418db4

Please sign in to comment.