Enum ruma_client_api::error::ErrorKind
source · [−]#[non_exhaustive]
pub enum ErrorKind {
Show 33 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,
WeakPassword,
// some variants omitted
}
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
Fields
M_UNKNOWN_TOKEN
MissingToken
M_MISSING_TOKEN
BadJson
M_BAD_JSON
NotJson
M_NOT_JSON
NotFound
M_NOT_FOUND
LimitExceeded
Fields
M_LIMIT_EXCEEDED
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
Fields
room_version: RoomVersionId
The room’s version.
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
Fields
admin_contact: String
A URI giving a contact method for the server administrator.
M_RESOURCE_LIMIT_EXCEEDED
CannotLeaveServerNoticeRoom
M_CANNOT_LEAVE_SERVER_NOTICE_ROOM
WeakPassword
M_WEAK_PASSWORD
Trait Implementations
sourceimpl<'de> Deserialize<'de> for ErrorKind
impl<'de> Deserialize<'de> for ErrorKind
sourcefn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ErrorKind
impl StructuralEq for ErrorKind
impl StructuralPartialEq for ErrorKind
Auto Trait Implementations
impl RefUnwindSafe for ErrorKind
impl Send for ErrorKind
impl Sync for ErrorKind
impl Unpin for ErrorKind
impl UnwindSafe for ErrorKind
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more