pub struct UsernameStr { /* private fields */ }Trait Implementations§
Source§impl BoundedString for UsernameStr
impl BoundedString for UsernameStr
const MIN_LENGTH: Option<usize>
const MAX_LENGTH: Option<usize>
const DEFAULT: Option<&'static str>
const PATTERN: Option<&'static str>
const TYPE_DESCRIPTION: &'static str = "a string with length at most 64"
fn get_value(&self) -> &str
fn new(value: String) -> Result<Self, BoundedStringError>
fn validate(value: &str) -> Result<(), BoundedStringError>
Source§impl Clone for UsernameStr
impl Clone for UsernameStr
Source§fn clone(&self) -> UsernameStr
fn clone(&self) -> UsernameStr
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 UsernameStr
impl Debug for UsernameStr
Source§impl<'de> Deserialize<'de> for UsernameStr
impl<'de> Deserialize<'de> for UsernameStr
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 PartialEq for UsernameStr
impl PartialEq for UsernameStr
Source§fn eq(&self, other: &UsernameStr) -> bool
fn eq(&self, other: &UsernameStr) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for UsernameStr
impl PartialOrd for UsernameStr
Source§impl Serialize for UsernameStr
impl Serialize for UsernameStr
impl StructuralPartialEq for UsernameStr
Auto Trait Implementations§
impl Freeze for UsernameStr
impl RefUnwindSafe for UsernameStr
impl Send for UsernameStr
impl Sync for UsernameStr
impl Unpin for UsernameStr
impl UnsafeUnpin for UsernameStr
impl UnwindSafe for UsernameStr
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