pub struct DisplayNameRef(/* private fields */);
Expand description
A users display name
Implementations§
Source§impl DisplayNameRef
impl DisplayNameRef
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 DisplayNameRef
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 DisplayNameRef
Sourcepub fn into_owned(self: Box<DisplayNameRef>) -> DisplayName
pub fn into_owned(self: Box<DisplayNameRef>) -> DisplayName
Converts a Box<DisplayNameRef>
into a DisplayName
without copying or allocating
Source§impl DisplayNameRef
impl DisplayNameRef
Sourcepub fn as_cow(&self) -> Cow<'_, DisplayNameRef>
pub fn as_cow(&self) -> Cow<'_, DisplayNameRef>
Get a
Cow<'_, DisplayNameRef>
Trait Implementations§
Source§impl AsRef<DisplayNameRef> for DisplayName
impl AsRef<DisplayNameRef> for DisplayName
Source§fn as_ref(&self) -> &DisplayNameRef
fn as_ref(&self) -> &DisplayNameRef
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl AsRef<str> for DisplayNameRef
impl AsRef<str> for DisplayNameRef
Source§impl Borrow<DisplayNameRef> for DisplayName
impl Borrow<DisplayNameRef> for DisplayName
Source§fn borrow(&self) -> &DisplayNameRef
fn borrow(&self) -> &DisplayNameRef
Immutably borrows from an owned value. Read more
Source§impl Borrow<str> for DisplayNameRef
impl Borrow<str> for DisplayNameRef
Source§impl Debug for DisplayNameRef
impl Debug for DisplayNameRef
Source§impl<'de: 'a, 'a> Deserialize<'de> for &'a DisplayNameRef
Available on crate feature serde
only.
impl<'de: 'a, 'a> Deserialize<'de> for &'a DisplayNameRef
Available on crate feature
serde
only.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<DisplayNameRef>
Available on crate feature serde
only.
impl<'de> Deserialize<'de> for Box<DisplayNameRef>
Available on crate feature
serde
only.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 DisplayNameRef
impl Display for DisplayNameRef
Source§impl<'a> From<&'a &'a DisplayNameRef> for Collection<'a, DisplayName>
impl<'a> From<&'a &'a DisplayNameRef> for Collection<'a, DisplayName>
Source§fn from(v: &'a &'a DisplayNameRef) -> Self
fn from(v: &'a &'a DisplayNameRef) -> Self
Converts to this type from the input type.
Source§impl<'a, 'b: 'a> From<&'a Cow<'b, DisplayNameRef>> for &'a DisplayNameRef
impl<'a, 'b: 'a> From<&'a Cow<'b, DisplayNameRef>> for &'a DisplayNameRef
Source§fn from(r: &'a Cow<'b, DisplayNameRef>) -> &'a DisplayNameRef
fn from(r: &'a Cow<'b, DisplayNameRef>) -> &'a DisplayNameRef
Converts to this type from the input type.
Source§impl<'a> From<&'a DisplayName> for &'a DisplayNameRef
impl<'a> From<&'a DisplayName> for &'a DisplayNameRef
Source§fn from(owned: &'a DisplayName) -> Self
fn from(owned: &'a DisplayName) -> Self
Converts to this type from the input type.
Source§impl From<&DisplayNameRef> for Arc<DisplayNameRef>
impl From<&DisplayNameRef> for Arc<DisplayNameRef>
Source§fn from(r: &DisplayNameRef) -> Self
fn from(r: &DisplayNameRef) -> Self
Converts to this type from the input type.
Source§impl<'a> From<&'a DisplayNameRef> for Cow<'a, DisplayNameRef>
impl<'a> From<&'a DisplayNameRef> for Cow<'a, DisplayNameRef>
Source§fn from(r: &'a DisplayNameRef) -> Self
fn from(r: &'a DisplayNameRef) -> Self
Converts to this type from the input type.
Source§impl From<&DisplayNameRef> for DisplayName
impl From<&DisplayNameRef> for DisplayName
Source§fn from(s: &DisplayNameRef) -> Self
fn from(s: &DisplayNameRef) -> Self
Converts to this type from the input type.
Source§impl From<&DisplayNameRef> for Rc<DisplayNameRef>
impl From<&DisplayNameRef> for Rc<DisplayNameRef>
Source§fn from(r: &DisplayNameRef) -> Self
fn from(r: &DisplayNameRef) -> Self
Converts to this type from the input type.
Source§impl<'a> From<&'a String> for &'a DisplayNameRef
impl<'a> From<&'a String> for &'a DisplayNameRef
Source§impl<'a> From<&'a str> for &'a DisplayNameRef
impl<'a> From<&'a str> for &'a DisplayNameRef
Source§fn from(s: &'a str) -> &'a DisplayNameRef
fn from(s: &'a str) -> &'a DisplayNameRef
Converts to this type from the input type.
Source§impl From<DisplayName> for Box<DisplayNameRef>
impl From<DisplayName> for Box<DisplayNameRef>
Source§fn from(r: DisplayName) -> Self
fn from(r: DisplayName) -> Self
Converts to this type from the input type.
Source§impl Hash for DisplayNameRef
impl Hash for DisplayNameRef
Source§impl<'a> IntoCow<'a, DisplayNameRef> for &'a DisplayName
impl<'a> IntoCow<'a, DisplayNameRef> for &'a DisplayName
Source§fn into_cow(self) -> Cow<'a, DisplayNameRef>
fn into_cow(self) -> Cow<'a, DisplayNameRef>
Make the cow with proper ownership, muu
Source§impl<'a> IntoCow<'a, DisplayNameRef> for &'a DisplayNameRef
impl<'a> IntoCow<'a, DisplayNameRef> for &'a DisplayNameRef
Source§fn into_cow(self) -> Cow<'a, DisplayNameRef>
fn into_cow(self) -> Cow<'a, DisplayNameRef>
Make the cow with proper ownership, muu
Source§impl<'a> IntoCow<'a, DisplayNameRef> for DisplayName
impl<'a> IntoCow<'a, DisplayNameRef> for DisplayName
Source§fn into_cow(self) -> Cow<'a, DisplayNameRef>
fn into_cow(self) -> Cow<'a, DisplayNameRef>
Make the cow with proper ownership, muu
Source§impl Ord for DisplayNameRef
impl Ord for DisplayNameRef
Source§impl PartialEq<&DisplayNameRef> for DisplayName
impl PartialEq<&DisplayNameRef> for DisplayName
Source§impl PartialEq<DisplayName> for &DisplayNameRef
impl PartialEq<DisplayName> for &DisplayNameRef
Source§impl PartialEq<DisplayName> for DisplayNameRef
impl PartialEq<DisplayName> for DisplayNameRef
Source§impl PartialEq<DisplayNameRef> for DisplayName
impl PartialEq<DisplayNameRef> for DisplayName
Source§impl PartialEq for DisplayNameRef
impl PartialEq for DisplayNameRef
Source§impl PartialOrd for DisplayNameRef
impl PartialOrd for DisplayNameRef
Source§impl Serialize for DisplayNameRef
Available on crate feature serde
only.
impl Serialize for DisplayNameRef
Available on crate feature
serde
only.Source§impl ToOwned for DisplayNameRef
impl ToOwned for DisplayNameRef
Source§type Owned = DisplayName
type Owned = DisplayName
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