Enum ruma::api::client::error::ErrorKind [−][src]
#[non_exhaustive]
pub enum ErrorKind {
Show 32 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
}
api
and (crate features client-api
or client-api-c
or client-api-s
) only.Expand description
An enum for the error kind. Items may contain additional information.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
M_FORBIDDEN
M_UNKNOWN_TOKEN
Fields of UnknownToken
M_MISSING_TOKEN
M_BAD_JSON
M_NOT_JSON
M_NOT_FOUND
M_LIMIT_EXCEEDED
Fields of LimitExceeded
M_UNKNOWN
M_UNRECOGNIZED
M_UNAUTHORIZED
M_USER_DEACTIVATED
M_USER_IN_USE
M_INVALID_USERNAME
M_ROOM_IN_USE
M_INVALID_ROOM_STATE
M_THREEPID_IN_USE
M_THREEPID_NOT_FOUND
M_THREEPID_AUTH_FAILED
M_THREEPID_DENIED
M_SERVER_NOT_TRUSTED
M_UNSUPPORTED_ROOM_VERSION
M_INCOMPATIBLE_ROOM_VERSION
Fields of IncompatibleRoomVersion
room_version: RoomVersionId
The room’s version.
M_BAD_STATE
M_GUEST_ACCESS_FORBIDDEN
M_CAPTCHA_NEEDED
M_CAPTCHA_INVALID
M_MISSING_PARAM
M_INVALID_PARAM
M_TOO_LARGE
M_EXCLUSIVE
M_RESOURCE_LIMIT_EXCEEDED
Fields of ResourceLimitExceeded
admin_contact: String
A URI giving a contact method for the server administrator.
M_CANNOT_LEAVE_SERVER_NOTICE_ROOM
Trait Implementations
pub fn deserialize<D>(
deserializer: D
) -> Result<ErrorKind, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
pub fn deserialize<D>(
deserializer: D
) -> Result<ErrorKind, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
pub fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
pub fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for ErrorKind
impl UnwindSafe for ErrorKind
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
type Output = T
type Output = T
Should always be Self
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more