Enum ruma::server_util::authorization::XMatrixParseError
source · #[non_exhaustive]pub enum XMatrixParseError {
ToStr(ToStrError),
ParseStr(String),
NotFound,
ParseId(Error),
ParseBase64(Base64DecodeError),
MissingParameter(String),
DuplicateParameter(String),
}
Available on crate feature
server-util
only.Expand description
An error when trying to parse an X-Matrix Authorization header.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
ToStr(ToStrError)
The HeaderValue
could not be converted to a str
.
ParseStr(String)
The string could not be parsed as a valid Authorization string.
NotFound
The credentials with the X-Matrix scheme were not found.
ParseId(Error)
The parameter value could not be parsed as a Matrix ID.
ParseBase64(Base64DecodeError)
The parameter value could not be parsed as base64.
MissingParameter(String)
The parameter with the given name was not found.
DuplicateParameter(String)
The parameter with the given name was found more than once.
Trait Implementations§
source§impl Debug for XMatrixParseError
impl Debug for XMatrixParseError
source§impl Display for XMatrixParseError
impl Display for XMatrixParseError
source§impl Error for XMatrixParseError
impl Error for XMatrixParseError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl From<Base64DecodeError> for XMatrixParseError
impl From<Base64DecodeError> for XMatrixParseError
source§fn from(source: Base64DecodeError) -> XMatrixParseError
fn from(source: Base64DecodeError) -> XMatrixParseError
Converts to this type from the input type.
source§impl<'a> From<Error<'a>> for XMatrixParseError
impl<'a> From<Error<'a>> for XMatrixParseError
source§fn from(value: Error<'a>) -> XMatrixParseError
fn from(value: Error<'a>) -> XMatrixParseError
Converts to this type from the input type.
source§impl From<Error> for XMatrixParseError
impl From<Error> for XMatrixParseError
source§fn from(source: Error) -> XMatrixParseError
fn from(source: Error) -> XMatrixParseError
Converts to this type from the input type.
source§impl From<ToStrError> for XMatrixParseError
impl From<ToStrError> for XMatrixParseError
source§fn from(source: ToStrError) -> XMatrixParseError
fn from(source: ToStrError) -> XMatrixParseError
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for XMatrixParseError
impl RefUnwindSafe for XMatrixParseError
impl Send for XMatrixParseError
impl Sync for XMatrixParseError
impl Unpin for XMatrixParseError
impl UnwindSafe for XMatrixParseError
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
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,
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§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>
Converts
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>
Converts
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