mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-15 11:36:07 -04:00
docs(sdk): Add more doc links to as_ruma_api_error methods
This commit is contained in:
committed by
Jonas Platte
parent
128c74ace5
commit
c8dd5c42e9
@@ -118,7 +118,9 @@ pub enum HttpError {
|
||||
|
||||
#[rustfmt::skip] // stop rustfmt breaking the `<code>` in docs across multiple lines
|
||||
impl HttpError {
|
||||
/// If `self` is `Api(Server(Known(e)))`, returns `Some(e)`.
|
||||
/// If `self` is
|
||||
/// <code>[Api](Self::Api)([Server](FromHttpResponseError::Server)([Known](ServerError::Known)(e)))</code>,
|
||||
/// returns `Some(e)`.
|
||||
///
|
||||
/// Otherwise, returns `None`.
|
||||
pub fn as_ruma_api_error(&self) -> Option<&RumaApiError> {
|
||||
@@ -227,7 +229,9 @@ pub enum Error {
|
||||
|
||||
#[rustfmt::skip] // stop rustfmt breaking the `<code>` in docs across multiple lines
|
||||
impl Error {
|
||||
/// If `self` is `Http(Api(Server(Known(e))))`, returns `Some(e)`.
|
||||
/// If `self` is
|
||||
/// <code>[Http](Self::Http)([Api](HttpError::Api)([Server](FromHttpResponseError::Server)([Known](ServerError::Known)(e))))</code>,
|
||||
/// returns `Some(e)`.
|
||||
///
|
||||
/// Otherwise, returns `None`.
|
||||
pub fn as_ruma_api_error(&self) -> Option<&RumaApiError> {
|
||||
|
||||
Reference in New Issue
Block a user