pub struct AuthUsername {
pub username: String,
}Expand description
A struct that represents a well-formed username.
§Arguments
Please use new() to create a new instance of this struct.
§Errors
You will receive a FieldFormatError, if:
- The username is not between 2 and 32 characters.
Fields§
§username: StringImplementations§
Source§impl AuthUsername
impl AuthUsername
Sourcepub fn new(username: String) -> Result<AuthUsername, FieldFormatError>
pub fn new(username: String) -> Result<AuthUsername, FieldFormatError>
Returns a new Result<AuthUsername, FieldFormatError>.
§Arguments
The username you want to validate.
§Errors
You will receive a FieldFormatError, if:
- The username is not between 2 and 32 characters.
Trait Implementations§
Source§impl Clone for AuthUsername
impl Clone for AuthUsername
Source§fn clone(&self) -> AuthUsername
fn clone(&self) -> AuthUsername
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 AuthUsername
impl Debug for AuthUsername
Source§impl PartialEq for AuthUsername
impl PartialEq for AuthUsername
impl Eq for AuthUsername
impl StructuralPartialEq for AuthUsername
Auto Trait Implementations§
impl Freeze for AuthUsername
impl RefUnwindSafe for AuthUsername
impl Send for AuthUsername
impl Sync for AuthUsername
impl Unpin for AuthUsername
impl UnwindSafe for AuthUsername
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