pub struct MinimalUsername(/* private fields */);Expand description
A wrapper around a custom string-like type that implements the minimal set of required traits for a braid type
Implementations§
Source§impl MinimalUsername
impl MinimalUsername
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 MinimalUsername
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 MinimalUsername
Sourcepub fn into_owned(self: Box<MinimalUsername>) -> MinimalUsernameBuf
pub fn into_owned(self: Box<MinimalUsername>) -> MinimalUsernameBuf
Converts a Box<MinimalUsername> into a MinimalUsernameBuf without copying or allocating
Trait Implementations§
Source§impl AsRef<MinimalUsername> for MinimalUsernameBuf
impl AsRef<MinimalUsername> for MinimalUsernameBuf
Source§fn as_ref(&self) -> &MinimalUsername
fn as_ref(&self) -> &MinimalUsername
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl AsRef<str> for MinimalUsername
impl AsRef<str> for MinimalUsername
Source§impl Borrow<MinimalUsername> for MinimalUsernameBuf
impl Borrow<MinimalUsername> for MinimalUsernameBuf
Source§fn borrow(&self) -> &MinimalUsername
fn borrow(&self) -> &MinimalUsername
Immutably borrows from an owned value. Read more
Source§impl Borrow<str> for MinimalUsername
impl Borrow<str> for MinimalUsername
Source§impl Debug for MinimalUsername
impl Debug for MinimalUsername
Source§impl<'de: 'a, 'a> Deserialize<'de> for &'a MinimalUsername
impl<'de: 'a, 'a> Deserialize<'de> for &'a MinimalUsername
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<MinimalUsername>
impl<'de> Deserialize<'de> for Box<MinimalUsername>
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 Display for MinimalUsername
impl Display for MinimalUsername
Source§impl<'a, 'b: 'a> From<&'a Cow<'b, MinimalUsername>> for &'a MinimalUsername
impl<'a, 'b: 'a> From<&'a Cow<'b, MinimalUsername>> for &'a MinimalUsername
Source§fn from(r: &'a Cow<'b, MinimalUsername>) -> &'a MinimalUsername
fn from(r: &'a Cow<'b, MinimalUsername>) -> &'a MinimalUsername
Converts to this type from the input type.
Source§impl From<&MinimalUsername> for Arc<MinimalUsername>
impl From<&MinimalUsername> for Arc<MinimalUsername>
Source§fn from(r: &MinimalUsername) -> Self
fn from(r: &MinimalUsername) -> Self
Converts to this type from the input type.
Source§impl<'a> From<&'a MinimalUsername> for Cow<'a, MinimalUsername>
impl<'a> From<&'a MinimalUsername> for Cow<'a, MinimalUsername>
Source§fn from(r: &'a MinimalUsername) -> Self
fn from(r: &'a MinimalUsername) -> Self
Converts to this type from the input type.
Source§impl From<&MinimalUsername> for MinimalUsernameBuf
impl From<&MinimalUsername> for MinimalUsernameBuf
Source§fn from(s: &MinimalUsername) -> Self
fn from(s: &MinimalUsername) -> Self
Converts to this type from the input type.
Source§impl From<&MinimalUsername> for Rc<MinimalUsername>
impl From<&MinimalUsername> for Rc<MinimalUsername>
Source§fn from(r: &MinimalUsername) -> Self
fn from(r: &MinimalUsername) -> Self
Converts to this type from the input type.
Source§impl<'a> From<&'a str> for &'a MinimalUsername
impl<'a> From<&'a str> for &'a MinimalUsername
Source§fn from(s: &'a str) -> &'a MinimalUsername
fn from(s: &'a str) -> &'a MinimalUsername
Converts to this type from the input type.
Source§impl From<MinimalUsernameBuf> for Box<MinimalUsername>
impl From<MinimalUsernameBuf> for Box<MinimalUsername>
Source§fn from(r: MinimalUsernameBuf) -> Self
fn from(r: MinimalUsernameBuf) -> Self
Converts to this type from the input type.
Source§impl Hash for MinimalUsername
impl Hash for MinimalUsername
Source§impl Ord for MinimalUsername
impl Ord for MinimalUsername
Source§impl PartialEq<&MinimalUsername> for MinimalUsernameBuf
impl PartialEq<&MinimalUsername> for MinimalUsernameBuf
Source§impl PartialEq<MinimalUsernameBuf> for &MinimalUsername
impl PartialEq<MinimalUsernameBuf> for &MinimalUsername
Source§impl PartialEq for MinimalUsername
impl PartialEq for MinimalUsername
Source§impl PartialOrd for MinimalUsername
impl PartialOrd for MinimalUsername
Source§impl Serialize for MinimalUsername
impl Serialize for MinimalUsername
Source§impl ToOwned for MinimalUsername
impl ToOwned for MinimalUsername
Source§type Owned = MinimalUsernameBuf
type Owned = MinimalUsernameBuf
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