#[non_exhaustive]pub enum ErrorKind {
Show 46 variants
Forbidden {},
UnknownToken {
soft_logout: bool,
},
MissingToken,
BadJson,
NotJson,
NotFound,
LimitExceeded {
retry_after: Option<RetryAfter>,
},
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,
WeakPassword,
UnableToAuthorizeJoin,
UnableToGrantJoin,
BadAlias,
DuplicateAnnotation,
NotYetUploaded,
CannotOverwriteMedia,
UnknownPos,
UrlNotSet,
BadStatus {
status: Option<StatusCode>,
body: Option<String>,
},
ConnectionFailed,
ConnectionTimeout,
WrongRoomKeysVersion {
current_version: Option<String>,
},
UserLocked,
}
Expand description
An enum for the error kind.
Items may contain additional information.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Forbidden
M_FORBIDDEN
UnknownToken
M_UNKNOWN_TOKEN
Fields
MissingToken
M_MISSING_TOKEN
BadJson
M_BAD_JSON
NotJson
M_NOT_JSON
NotFound
M_NOT_FOUND
LimitExceeded
M_LIMIT_EXCEEDED
Fields
retry_after: Option<RetryAfter>
How long a client should wait before they can try again.
Unknown
M_UNKNOWN
Unrecognized
M_UNRECOGNIZED
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
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
CannotLeaveServerNoticeRoom
M_CANNOT_LEAVE_SERVER_NOTICE_ROOM
WeakPassword
M_WEAK_PASSWORD
UnableToAuthorizeJoin
M_UNABLE_TO_AUTHORISE_JOIN
UnableToGrantJoin
M_UNABLE_TO_GRANT_JOIN
BadAlias
M_BAD_ALIAS
DuplicateAnnotation
M_DUPLICATE_ANNOTATION
NotYetUploaded
M_NOT_YET_UPLOADED
CannotOverwriteMedia
M_CANNOT_OVERWRITE_MEDIA
UnknownPos
M_UNKNOWN_POS for sliding sync
UrlNotSet
M_URL_NOT_SET
BadStatus
M_BAD_STATUS
Fields
status: Option<StatusCode>
The HTTP status code of the response.
ConnectionFailed
M_CONNECTION_FAILED
ConnectionTimeout
M_CONNECTION_TIMEOUT
WrongRoomKeysVersion
M_WRONG_ROOM_KEYS_VERSION
UserLocked
M_USER_LOCKED
Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for ErrorKind
impl<'de> Deserialize<'de> for ErrorKind
source§fn deserialize<D>(
deserializer: D,
) -> Result<ErrorKind, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<ErrorKind, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
source§impl PartialEq for ErrorKind
impl PartialEq for ErrorKind
source§impl Serialize for ErrorKind
impl Serialize for ErrorKind
source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
impl Eq for ErrorKind
impl StructuralPartialEq for ErrorKind
Auto Trait Implementations§
impl Freeze for ErrorKind
impl RefUnwindSafe for ErrorKind
impl Send for ErrorKind
impl Sync for ErrorKind
impl Unpin for ErrorKind
impl UnwindSafe for ErrorKind
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.