#[non_exhaustive]pub enum UsernameError {
ContainsColon,
InvalidCharacter,
InvalidPercentEncoding,
}Expand description
An error representing an invalid username component.
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.
ContainsColon
The username contained a ':' which is only to be used as a delimiter between the username
and password. This variant can only happen when trying to directly parse a username from a
byte source.
InvalidCharacter
The username contained an invalid character.
InvalidPercentEncoding
The username contained an invalid percent encoding (e.g. "%ZZ").
Trait Implementations§
Source§impl Clone for UsernameError
impl Clone for UsernameError
Source§fn clone(&self) -> UsernameError
fn clone(&self) -> UsernameError
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for UsernameError
impl Debug for UsernameError
Source§impl Display for UsernameError
impl Display for UsernameError
Source§impl Error for UsernameError
impl Error for UsernameError
1.30.0 · 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<Infallible> for UsernameError
impl From<Infallible> for UsernameError
Source§fn from(_: Infallible) -> Self
fn from(_: Infallible) -> Self
Converts to this type from the input type.
Source§impl From<UsernameError> for AuthorityError
impl From<UsernameError> for AuthorityError
Source§fn from(value: UsernameError) -> Self
fn from(value: UsernameError) -> Self
Converts to this type from the input type.
Source§impl Hash for UsernameError
impl Hash for UsernameError
Source§impl PartialEq for UsernameError
impl PartialEq for UsernameError
impl Copy for UsernameError
impl Eq for UsernameError
impl StructuralPartialEq for UsernameError
Auto Trait Implementations§
impl Freeze for UsernameError
impl RefUnwindSafe for UsernameError
impl Send for UsernameError
impl Sync for UsernameError
impl Unpin for UsernameError
impl UnwindSafe for UsernameError
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