#[non_exhaustive]pub enum ErrorCode {
Show 48 variants
Forbidden,
UnknownToken,
MissingToken,
BadJson,
NotJson,
NotFound,
LimitExceeded,
Unknown,
Unrecognized,
Unauthorized,
UserDeactivated,
UserInUse,
InvalidUsername,
RoomInUse,
InvalidRoomState,
ThreepidInUse,
ThreepidNotFound,
ThreepidAuthFailed,
ThreepidDenied,
ThreepidMediumNotSupported,
ServerNotTrusted,
UnsupportedRoomVersion,
IncompatibleRoomVersion,
BadState,
GuestAccessForbidden,
CaptchaNeeded,
CaptchaInvalid,
MissingParam,
InvalidParam,
TooLarge,
Exclusive,
ResourceLimitExceeded,
CannotLeaveServerNoticeRoom,
WeakPassword,
UnableToAuthorizeJoin,
UnableToGrantJoin,
BadAlias,
DuplicateAnnotation,
NotYetUploaded,
CannotOverwriteMedia,
UnknownPos,
UrlNotSet,
BadStatus,
ConnectionFailed,
ConnectionTimeout,
WrongRoomKeysVersion,
UserLocked,
UserSuspended,
}
api
and (crate features client
or server
) only.Expand description
The possible error codes defined in the Matrix spec.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Forbidden
M_FORBIDDEN
UnknownToken
M_UNKNOWN_TOKEN
MissingToken
M_MISSING_TOKEN
BadJson
M_BAD_JSON
NotJson
M_NOT_JSON
NotFound
M_NOT_FOUND
LimitExceeded
M_LIMIT_EXCEEDED
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
ThreepidMediumNotSupported
M_THREEPID_MEDIUM_NOT_SUPPORTED
ServerNotTrusted
M_SERVER_NOT_TRUSTED
UnsupportedRoomVersion
M_UNSUPPORTED_ROOM_VERSION
IncompatibleRoomVersion
M_INCOMPATIBLE_ROOM_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
unstable-msc3575
or unstable-msc4186
only.M_UNKNOWN_POS for sliding sync
UrlNotSet
M_URL_NOT_SET
BadStatus
M_BAD_STATUS
ConnectionFailed
M_CONNECTION_FAILED
ConnectionTimeout
M_CONNECTION_TIMEOUT
WrongRoomKeysVersion
M_WRONG_ROOM_KEYS_VERSION
UserLocked
M_USER_LOCKED
UserSuspended
M_USER_SUSPENDED
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ErrorCode
impl<'de> Deserialize<'de> for ErrorCode
Source§fn deserialize<D>(
deserializer: D,
) -> Result<ErrorCode, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<ErrorCode, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Source§impl Serialize for ErrorCode
impl Serialize for ErrorCode
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,
Auto Trait Implementations§
impl Freeze for ErrorCode
impl RefUnwindSafe for ErrorCode
impl Send for ErrorCode
impl Sync for ErrorCode
impl Unpin for ErrorCode
impl UnwindSafe for ErrorCode
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,
§impl<T> CompatExt for T
impl<T> CompatExt for T
Source§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
Source§fn consume_handle(handle: Handle) -> Arc<T>
fn consume_handle(handle: Handle) -> Arc<T>
Arc<>
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more