#[non_exhaustive]pub enum Error {
Show 16 variants
EmptyClientSecret,
EmptyRoomName,
EmptyRoomVersionId,
InvalidCharacters,
InvalidKeyAlgorithm,
InvalidKeyVersion,
InvalidMatrixId(MatrixIdError),
InvalidMatrixToRef(MatrixToError),
InvalidMatrixUri(MatrixUriError),
InvalidMxcUri(MxcUriError),
InvalidServerName,
InvalidUri,
InvalidUtf8,
MaximumLengthExceeded,
MissingDelimiter,
MissingLeadingSigil,
}Expand description
An error encountered when trying to parse an invalid ID string.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
EmptyClientSecret
The client secret is empty.
EmptyRoomName
The room name is empty.
EmptyRoomVersionId
The room version ID is empty.
InvalidCharacters
The ID’s localpart contains invalid characters.
Only relevant for user IDs.
InvalidKeyAlgorithm
The key algorithm is invalid (e.g. empty).
InvalidKeyVersion
The key version contains outside of [a-zA-Z0-9_].
InvalidMatrixId(MatrixIdError)
The string isn’t a valid Matrix ID.
InvalidMatrixToRef(MatrixToError)
The string isn’t a valid Matrix.to URI.
InvalidMatrixUri(MatrixUriError)
The string isn’t a valid Matrix URI.
InvalidMxcUri(MxcUriError)
The mxc:// isn’t a valid Matrix Content URI.
InvalidServerName
The server name part of the the ID string is not a valid server name.
InvalidUri
The string isn’t a valid URI.
InvalidUtf8
The string isn’t valid UTF-8.
MaximumLengthExceeded
The ID exceeds 255 bytes (or 32 codepoints for a room version ID).
MissingDelimiter
The ID is missing the colon delimiter between localpart and server name, or between key algorithm and key name / version.
MissingLeadingSigil
The ID is missing the correct leading sigil.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl From<MatrixIdError> for Error
impl From<MatrixIdError> for Error
Source§fn from(source: MatrixIdError) -> Error
fn from(source: MatrixIdError) -> Error
Source§impl From<MatrixToError> for Error
impl From<MatrixToError> for Error
Source§fn from(source: MatrixToError) -> Error
fn from(source: MatrixToError) -> Error
Source§impl From<MatrixUriError> for Error
impl From<MatrixUriError> for Error
Source§fn from(source: MatrixUriError) -> Error
fn from(source: MatrixUriError) -> Error
Source§impl From<MxcUriError> for Error
impl From<MxcUriError> for Error
Source§fn from(source: MxcUriError) -> Error
fn from(source: MxcUriError) -> Error
Source§impl From<ParseError> for Error
impl From<ParseError> for Error
Source§fn from(_: ParseError) -> Error
fn from(_: ParseError) -> Error
impl Copy for Error
impl Eq for Error
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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