pub struct Username(/* private fields */);Expand description
Implementations§
Source§impl Username
impl Username
Sourcepub const fn from_str(raw: &str) -> &Self
pub const fn from_str(raw: &str) -> &Self
Transparently reinterprets the string slice as a strongly-typed Username
Sourcepub const fn from_static(raw: &'static str) -> &'static Self
pub const fn from_static(raw: &'static str) -> &'static Self
Transparently reinterprets the static string slice as a strongly-typed Username
Sourcepub fn into_owned(self: Box<Username>) -> UsernameBuf
pub fn into_owned(self: Box<Username>) -> UsernameBuf
Converts a Box<Username> into a UsernameBuf without copying or allocating
Trait Implementations§
Source§impl AsRef<Username> for UsernameBuf
impl AsRef<Username> for UsernameBuf
Source§impl Borrow<Username> for UsernameBuf
impl Borrow<Username> for UsernameBuf
Source§impl<'de: 'a, 'a> Deserialize<'de> for &'a Username
impl<'de: 'a, 'a> Deserialize<'de> for &'a Username
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl<'de> Deserialize<'de> for Box<Username>
impl<'de> Deserialize<'de> for Box<Username>
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&Username> for UsernameBuf
impl From<&Username> for UsernameBuf
Source§impl From<UsernameBuf> for Box<Username>
impl From<UsernameBuf> for Box<Username>
Source§fn from(r: UsernameBuf) -> Self
fn from(r: UsernameBuf) -> Self
Converts to this type from the input type.
Source§impl PartialEq<&Username> for UsernameBuf
impl PartialEq<&Username> for UsernameBuf
Source§impl PartialEq<Username> for UsernameBuf
impl PartialEq<Username> for UsernameBuf
Source§impl PartialEq<UsernameBuf> for &Username
impl PartialEq<UsernameBuf> for &Username
Source§impl PartialEq<UsernameBuf> for Username
impl PartialEq<UsernameBuf> for Username
Source§impl PartialOrd for Username
impl PartialOrd for Username
Source§impl ToOwned for Username
impl ToOwned for Username
Source§type Owned = UsernameBuf
type Owned = UsernameBuf
The resulting type after obtaining ownership.
Source§fn to_owned(&self) -> Self::Owned
fn to_owned(&self) -> Self::Owned
Creates owned data from borrowed data, usually by cloning. Read more
1.63.0 · Source§fn clone_into(&self, target: &mut Self::Owned)
fn clone_into(&self, target: &mut Self::Owned)
Uses borrowed data to replace owned data, usually by cloning. Read more