Enum uriparse::authority::UsernameError
source · [−]#[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
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
sourceimpl Clone for UsernameError
impl Clone for UsernameError
sourcefn clone(&self) -> UsernameError
fn clone(&self) -> UsernameError
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for UsernameError
impl Debug for UsernameError
sourceimpl Display for UsernameError
impl Display for UsernameError
sourceimpl Error for UsernameError
impl Error for UsernameError
1.30.0 · sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
sourceimpl From<Infallible> for UsernameError
impl From<Infallible> for UsernameError
sourcefn from(_: Infallible) -> Self
fn from(_: Infallible) -> Self
Performs the conversion.
sourceimpl From<UsernameError> for AuthorityError
impl From<UsernameError> for AuthorityError
sourcefn from(value: UsernameError) -> Self
fn from(value: UsernameError) -> Self
Performs the conversion.
sourceimpl Hash for UsernameError
impl Hash for UsernameError
sourceimpl PartialEq<UsernameError> for UsernameError
impl PartialEq<UsernameError> for UsernameError
impl Copy for UsernameError
impl Eq for UsernameError
impl StructuralEq for UsernameError
impl StructuralPartialEq for UsernameError
Auto Trait Implementations
impl RefUnwindSafe for UsernameError
impl Send for UsernameError
impl Sync for UsernameError
impl Unpin for UsernameError
impl UnwindSafe for UsernameError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more