pub enum UsernameError {
Empty,
TooLong(usize),
InvalidFirstCharacter,
InvalidCharacter,
}Available on crate feature
sys only.Expand description
Error type for username parsing.
Variants§
Empty
Empty username
TooLong(usize)
Username too long (max 32 characters)
InvalidFirstCharacter
Invalid first character (must be letter or underscore)
InvalidCharacter
Invalid character in username
Trait Implementations§
Source§impl Clone for UsernameError
impl Clone for UsernameError
Source§fn clone(&self) -> UsernameError
fn clone(&self) -> UsernameError
Returns a duplicate 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<'de> Deserialize<'de> for UsernameError
impl<'de> Deserialize<'de> for UsernameError
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for UsernameError
impl Display for UsernameError
Source§impl Error for UsernameError
Available on crate feature std only.
impl Error for UsernameError
Available on crate feature
std only.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 PartialEq for UsernameError
impl PartialEq for UsernameError
Source§impl Serialize for UsernameError
impl Serialize 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