#[non_exhaustive]pub enum XMatrixParseError {
ToStr(ToStrError),
ParseStr(String),
NotFound,
ParseId(IdParseError),
ParseBase64(Base64DecodeError),
MissingParameter(String),
DuplicateParameter(String),
}
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(IdParseError)
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§impl<'a> From<Error<'a>> for XMatrixParseError
impl<'a> From<Error<'a>> for XMatrixParseError
Source§impl From<Error> for XMatrixParseError
impl From<Error> for XMatrixParseError
Source§impl From<ToStrError> for XMatrixParseError
impl From<ToStrError> for XMatrixParseError
Source§fn from(source: ToStrError) -> Self
fn from(source: ToStrError) -> Self
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