Enum ruma_client_api::error::ErrorKind[][src]

pub enum ErrorKind {
Show variants Forbidden, UnknownToken { soft_logout: bool, }, MissingToken, BadJson, NotJson, NotFound, LimitExceeded { retry_after_ms: Option<Duration>, }, Unknown, Unrecognized, Unauthorized, UserDeactivated, UserInUse, InvalidUsername, RoomInUse, InvalidRoomState, ThreepidInUse, ThreepidNotFound, ThreepidAuthFailed, ThreepidDenied, ServerNotTrusted, UnsupportedRoomVersion, IncompatibleRoomVersion { room_version: RoomVersionId, }, BadState, GuestAccessForbidden, CaptchaNeeded, CaptchaInvalid, MissingParam, InvalidParam, TooLarge, Exclusive, ResourceLimitExceeded { admin_contact: String, }, CannotLeaveServerNoticeRoom, // some variants omitted
}

An enum for the error kind. Items may contain additional information.

Variants

Forbidden

M_FORBIDDEN

UnknownToken

M_UNKNOWN_TOKEN

Fields of UnknownToken

soft_logout: bool

If this is true, the client can acquire a new access token by specifying the device ID it is already using to the login API. For more information, see the spec.

MissingToken

M_MISSING_TOKEN

BadJson

M_BAD_JSON

NotJson

M_NOT_JSON

NotFound

M_NOT_FOUND

LimitExceeded

M_LIMIT_EXCEEDED

Fields of LimitExceeded

retry_after_ms: Option<Duration>

How long a client should wait in milliseconds before they can try again.

Unknown

M_UNKNOWN

Unrecognized

M_UNRECOGNIZED

Unauthorized

M_UNAUTHORIZED

UserDeactivated

M_USER_DEACTIVATED

UserInUse

M_USER_IN_USE

InvalidUsername

M_INVALID_USERNAME

RoomInUse

M_ROOM_IN_USE

InvalidRoomState

M_INVALID_ROOM_STATE

ThreepidInUse

M_THREEPID_IN_USE

ThreepidNotFound

M_THREEPID_NOT_FOUND

ThreepidAuthFailed

M_THREEPID_AUTH_FAILED

ThreepidDenied

M_THREEPID_DENIED

ServerNotTrusted

M_SERVER_NOT_TRUSTED

UnsupportedRoomVersion

M_UNSUPPORTED_ROOM_VERSION

IncompatibleRoomVersion

M_INCOMPATIBLE_ROOM_VERSION

Fields of IncompatibleRoomVersion

room_version: RoomVersionId

The room’s version.

BadState

M_BAD_STATE

GuestAccessForbidden

M_GUEST_ACCESS_FORBIDDEN

CaptchaNeeded

M_CAPTCHA_NEEDED

CaptchaInvalid

M_CAPTCHA_INVALID

MissingParam

M_MISSING_PARAM

InvalidParam

M_INVALID_PARAM

TooLarge

M_TOO_LARGE

Exclusive

M_EXCLUSIVE

ResourceLimitExceeded

M_RESOURCE_LIMIT_EXCEEDED

Fields of ResourceLimitExceeded

admin_contact: String

A URI giving a contact method for the server administrator.

CannotLeaveServerNoticeRoom

M_CANNOT_LEAVE_SERVER_NOTICE_ROOM

Trait Implementations

impl AsRef<str> for ErrorKind[src]

impl Clone for ErrorKind[src]

impl Debug for ErrorKind[src]

impl<'de> Deserialize<'de> for ErrorKind[src]

impl Display for ErrorKind[src]

impl Eq for ErrorKind[src]

impl PartialEq<ErrorKind> for ErrorKind[src]

impl Serialize for ErrorKind[src]

impl StructuralEq for ErrorKind[src]

impl StructuralPartialEq for ErrorKind[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

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

impl<T> Instrument for T[src]

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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

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.