Enum ruma_client::Error
source · [−]#[non_exhaustive]
pub enum Error<E, F> {
AuthenticationRequired,
IntoHttp(IntoHttpError),
Url(Error),
Response(E),
FromHttpResponse(FromHttpResponseError<F>),
}
Expand description
An error that can occur during client operations.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
AuthenticationRequired
Queried endpoint requires authentication but was called on an anonymous client.
IntoHttp(IntoHttpError)
Construction of the HTTP request failed (this should never happen).
Url(Error)
The request’s URL is invalid (this should never happen).
Response(E)
Couldn’t obtain an HTTP response (e.g. due to network or DNS issues).
FromHttpResponse(FromHttpResponseError<F>)
Converting the HTTP response to one of ruma’s types failed.
Trait Implementations
sourceimpl<E: Debug + Display, F: Debug + Display> Error for Error<E, F>
impl<E: Debug + Display, F: Debug + Display> Error for Error<E, F>
1.30.0 · sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
sourceimpl<E, F> From<FromHttpResponseError<F>> for Error<E, F>
impl<E, F> From<FromHttpResponseError<F>> for Error<E, F>
sourcefn from(err: FromHttpResponseError<F>) -> Self
fn from(err: FromHttpResponseError<F>) -> Self
Converts to this type from the input type.
sourceimpl<E, F> From<IntoHttpError> for Error<E, F>
impl<E, F> From<IntoHttpError> for Error<E, F>
sourcefn from(err: IntoHttpError) -> Self
fn from(err: IntoHttpError) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl<E, F> !RefUnwindSafe for Error<E, F>
impl<E, F> Send for Error<E, F>where
E: Send,
F: Send,
impl<E, F> Sync for Error<E, F>where
E: Sync,
F: Sync,
impl<E, F> Unpin for Error<E, F>where
E: Unpin,
F: Unpin,
impl<E, F> !UnwindSafe for Error<E, F>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more