[][src]Enum matrix_sdk::Error

pub enum Error {
    AuthenticationRequired,
    NotClientRequest,
    Reqwest(ReqwestError),
    SerdeJson(JsonError),
    IO(IoError),
    RumaResponse(RumaResponseError<RumaClientError>),
    IntoHttp(RumaIntoHttpError),
    MatrixError(MatrixError),
    CryptoStoreError(CryptoStoreError),
    UiaaError(RumaResponseError<UiaaError>),
}

Internal representation of errors.

Variants

AuthenticationRequired

Queried endpoint requires authentication but was called on an anonymous client.

NotClientRequest

Queried endpoint is not meant for clients.

Reqwest(ReqwestError)

An error at the HTTP layer.

SerdeJson(JsonError)

An error de/serializing type for the StateStore

An IO error happened.

An error converting between ruma_client_api types and Hyper types.

An error converting between ruma_client_api types and Hyper types.

MatrixError(MatrixError)

An error occurred in the Matrix client library.

CryptoStoreError(CryptoStoreError)

An error occurred in the crypto store.

An error occurred while authenticating.

When registering or authenticating the Matrix server can send a UiaaResponse as the error type, this is a User-Interactive Authentication API response. This represents an error with information about how to authenticate the user.

Implementations

impl Error[src]

pub fn uiaa_response(&self) -> Option<&UiaaInfo>[src]

Try to destructure the error into an universal interactive auth info.

Some requests require universal interactive auth, doing such a request will always fail the first time with a 401 status code, the response body will contain info how the client can authenticate.

The request will need to be retried, this time containing additional authentication data.

This method is an convenience method to get to the info the server returned on the first, failed request.

Trait Implementations

impl Debug for Error[src]

impl Display for Error[src]

impl Error for Error[src]

impl From<CryptoStoreError> for Error[src]

impl From<Error> for Error[src]

impl From<Error> for Error[src]

impl From<Error> for Error[src]

impl From<Error> for Error[src]

impl From<FromHttpResponseError<Error>> for Error[src]

impl From<FromHttpResponseError<UiaaResponse>> for Error[src]

impl From<IntoHttpError> for Error[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> AsyncTraitDeps for T where
    T: Send + Sync + Debug
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Conv for T

impl<T> Conv for T

impl<T> FmtForward for T

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pipe for T where
    T: ?Sized

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Tap for T

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> TryConv for T

impl<T> TryConv for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> WithSubscriber for T[src]