pub struct MatrixError {
pub status: u16,
pub errcode: &'static str,
pub error: String,
pub retry_after_ms: Option<u64>,
pub soft_logout: Option<bool>,
pub current_version: Option<String>,
}Fields§
§status: u16§errcode: &'static str§error: String§retry_after_ms: Option<u64>§soft_logout: Option<bool>§current_version: Option<String>Implementations§
Source§impl MatrixError
impl MatrixError
pub fn missing_token() -> Self
pub fn unknown_token() -> Self
Federation request authentication failure (M_UNAUTHORIZED, 401).
Sourcepub fn invalid_nick(msg: impl Into<String>) -> Self
pub fn invalid_nick(msg: impl Into<String>) -> Self
Nick fails the grammar or a forbidden list (M4A_INVALID_NICK, 400).
Sourcepub fn nick_taken() -> Self
pub fn nick_taken() -> Self
Nick equals another live nick, a frozen localpart or a reserved one (M4A_NICK_TAKEN, 409).
Sourcepub fn nick_conflict() -> Self
pub fn nick_conflict() -> Self
An issuer asserted a nick that collides with another account’s localpart
(M4A_NICK_CONFLICT, 409). The issuer must pick another nick.
Sourcepub fn nick_cooldown(retry_after_ms: u64) -> Self
pub fn nick_cooldown(retry_after_ms: u64) -> Self
Nick changed too recently (M4A_NICK_COOLDOWN, 429).
Sourcepub fn policy_denied(msg: impl Into<String>) -> Self
pub fn policy_denied(msg: impl Into<String>) -> Self
The deployment’s policy hook refused the action (M4A_POLICY_DENIED, 403).
pub fn forbidden(msg: impl Into<String>) -> Self
pub fn not_found(msg: impl Into<String>) -> Self
pub fn unrecognized() -> Self
pub fn bad_json(msg: impl Into<String>) -> Self
pub fn managed_account_data_type(msg: impl Into<String>) -> Self
pub fn invalid_param(msg: impl Into<String>) -> Self
pub fn duplicate_annotation() -> Self
pub fn wrong_room_keys_version(current_version: Option<i64>) -> Self
pub fn limit_exceeded(retry_after_ms: u64) -> Self
pub fn unknown(msg: impl Into<String>) -> Self
pub fn internal() -> Self
Trait Implementations§
Source§impl Clone for MatrixError
impl Clone for MatrixError
Source§impl Debug for MatrixError
impl Debug for MatrixError
Source§impl From<Error> for MatrixError
impl From<Error> for MatrixError
Source§impl From<Error> for MatrixError
impl From<Error> for MatrixError
Source§impl From<MatrixKeysStoreError> for MatrixError
impl From<MatrixKeysStoreError> for MatrixError
Source§fn from(e: MatrixKeysStoreError) -> Self
fn from(e: MatrixKeysStoreError) -> Self
Converts to this type from the input type.
Source§impl From<MatrixStoreError> for MatrixError
impl From<MatrixStoreError> for MatrixError
Source§fn from(e: MatrixStoreError) -> Self
fn from(e: MatrixStoreError) -> Self
Converts to this type from the input type.
Source§impl IntoResponse for MatrixError
impl IntoResponse for MatrixError
Source§fn into_response(self) -> Response
fn into_response(self) -> Response
Create a response.
Source§impl PartialEq for MatrixError
impl PartialEq for MatrixError
Source§impl Serialize for MatrixError
impl Serialize for MatrixError
impl StructuralPartialEq for MatrixError
Auto Trait Implementations§
impl Freeze for MatrixError
impl RefUnwindSafe for MatrixError
impl Send for MatrixError
impl Sync for MatrixError
impl Unpin for MatrixError
impl UnsafeUnpin for MatrixError
impl UnwindSafe for MatrixError
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, S> Handler<IntoResponseHandler, S> for T
impl<T, S> Handler<IntoResponseHandler, S> for T
Source§fn call(
self,
_req: Request<Body>,
_state: S,
) -> <T as Handler<IntoResponseHandler, S>>::Future
fn call( self, _req: Request<Body>, _state: S, ) -> <T as Handler<IntoResponseHandler, S>>::Future
Call the handler with the given request.
Source§fn layer<L>(self, layer: L) -> Layered<L, Self, T, S>where
L: Layer<HandlerService<Self, T, S>> + Clone,
<L as Layer<HandlerService<Self, T, S>>>::Service: Service<Request<Body>>,
fn layer<L>(self, layer: L) -> Layered<L, Self, T, S>where
L: Layer<HandlerService<Self, T, S>> + Clone,
<L as Layer<HandlerService<Self, T, S>>>::Service: Service<Request<Body>>,
Apply a
tower::Layer to the handler. Read moreSource§fn with_state(self, state: S) -> HandlerService<Self, T, S>
fn with_state(self, state: S) -> HandlerService<Self, T, S>
Convert the handler into a
Service by providing the stateSource§impl<H, T> HandlerWithoutStateExt<T> for H
impl<H, T> HandlerWithoutStateExt<T> for H
Source§fn into_service(self) -> HandlerService<H, T, ()>
fn into_service(self) -> HandlerService<H, T, ()>
Convert the handler into a
Service and no state.Source§fn into_make_service(self) -> IntoMakeService<HandlerService<H, T, ()>>
fn into_make_service(self) -> IntoMakeService<HandlerService<H, T, ()>>
Convert the handler into a
MakeService and no state. Read moreSource§fn into_make_service_with_connect_info<C>(
self,
) -> IntoMakeServiceWithConnectInfo<HandlerService<H, T, ()>, C>
fn into_make_service_with_connect_info<C>( self, ) -> IntoMakeServiceWithConnectInfo<HandlerService<H, T, ()>, C>
Convert the handler into a
MakeService which stores information
about the incoming connection and has no state. Read more