Enum ruma_api::error::FromHttpResponseError [−][src]
#[non_exhaustive] pub enum FromHttpResponseError<E> { Deserialization(ResponseDeserializationError), Http(ServerError<E>), }
Expand description
An error when converting a http response to one of Ruma’s endpoint-specific response types.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Deserialization(ResponseDeserializationError)
Expand description
Deserialization failed
Http(ServerError<E>)
Expand description
The server returned a non-success status
Trait Implementations
impl<E: Debug> Debug for FromHttpResponseError<E>
[src]
impl<E: Debug> Debug for FromHttpResponseError<E>
[src]impl<E: Display> Display for FromHttpResponseError<E>
[src]
impl<E: Display> Display for FromHttpResponseError<E>
[src]impl<E: StdError> Error for FromHttpResponseError<E>
[src]
impl<E: StdError> Error for FromHttpResponseError<E>
[src]fn source(&self) -> Option<&(dyn Error + 'static)>
1.30.0[src]
fn source(&self) -> Option<&(dyn Error + 'static)>
1.30.0[src]The lower-level source of this error, if any. Read more
fn backtrace(&self) -> Option<&Backtrace>
[src]
fn backtrace(&self) -> Option<&Backtrace>
[src]🔬 This is a nightly-only experimental API. (
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
fn description(&self) -> &str
1.0.0[src]
fn description(&self) -> &str
1.0.0[src]👎 Deprecated since 1.42.0:
use the Display impl or to_string()
impl<E> From<ServerError<E>> for FromHttpResponseError<E>
[src]
impl<E> From<ServerError<E>> for FromHttpResponseError<E>
[src]fn from(err: ServerError<E>) -> Self
[src]
fn from(err: ServerError<E>) -> Self
[src]Performs the conversion.
impl<E, T> From<T> for FromHttpResponseError<E> where
T: Into<ResponseDeserializationError>,
[src]
impl<E, T> From<T> for FromHttpResponseError<E> where
T: Into<ResponseDeserializationError>,
[src]Auto Trait Implementations
impl<E> !RefUnwindSafe for FromHttpResponseError<E>
impl<E> Send for FromHttpResponseError<E> where
E: Send,
E: Send,
impl<E> Sync for FromHttpResponseError<E> where
E: Sync,
E: Sync,
impl<E> Unpin for FromHttpResponseError<E> where
E: Unpin,
E: Unpin,
impl<E> !UnwindSafe for FromHttpResponseError<E>
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more