#[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§fn from(source: Base64DecodeError) -> Self
fn from(source: Base64DecodeError) -> Self
Converts to this type from the input type.
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§fn from(source: IdParseError) -> Self
fn from(source: IdParseError) -> Self
Converts to this type from the input type.
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