Struct twitch_types::DisplayName
source · #[repr(transparent)]pub struct DisplayName(_);
Expand description
A users display name
Implementations§
source§impl DisplayName
impl DisplayName
sourcepub fn from_static(raw: &'static str) -> Self
pub fn from_static(raw: &'static str) -> Self
Constructs a newDisplayNamefrom a static reference
sourcepub fn into_boxed_ref(self) -> Box<DisplayNameRef>
pub fn into_boxed_ref(self) -> Box<DisplayNameRef>
Converts this DisplayName
into a Box<DisplayNameRef>
This will drop any excess capacity.
Methods from Deref<Target = DisplayNameRef>§
sourcepub fn as_cow<'a>(&'a self) -> Cow<'a, DisplayNameRef>
pub fn as_cow<'a>(&'a self) -> Cow<'a, DisplayNameRef>
Get a
Cow<'_, DisplayNameRef>
Trait Implementations§
source§impl<'a> Arbitrary<'a> for DisplayName
Available on crate feature arbitrary
only.
impl<'a> Arbitrary<'a> for DisplayName
Available on crate feature
arbitrary
only.source§fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self, Error>
fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self, Error>
Generate an arbitrary value of
Self
from the given unstructured data. Read moresource§fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
Generate an arbitrary value of
Self
from the entirety of the given
unstructured data. Read moresource§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 DisplayName
impl AsRef<str> for DisplayName
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 DisplayName
impl Borrow<str> for DisplayName
source§impl Clone for DisplayName
impl Clone for DisplayName
source§fn clone(&self) -> DisplayName
fn clone(&self) -> DisplayName
Returns a copy 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 DisplayName
impl Debug for DisplayName
source§impl Deref for DisplayName
impl Deref for DisplayName
source§impl<'de> Deserialize<'de> for DisplayName
Available on crate feature serde
only.
impl<'de> Deserialize<'de> for DisplayName
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 DisplayName
impl Display for DisplayName
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<'a> From<&'a DisplayName> for Cow<'a, DisplayNameRef>
impl<'a> From<&'a DisplayName> for Cow<'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 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<&str> for DisplayName
impl From<&str> for DisplayName
source§impl From<Box<DisplayNameRef, Global>> for DisplayName
impl From<Box<DisplayNameRef, Global>> for DisplayName
source§fn from(r: Box<DisplayNameRef>) -> Self
fn from(r: Box<DisplayNameRef>) -> Self
Converts to this type from the input type.
source§impl<'a> From<Cow<'a, DisplayNameRef>> for DisplayName
impl<'a> From<Cow<'a, DisplayNameRef>> for DisplayName
source§fn from(r: Cow<'a, DisplayNameRef>) -> Self
fn from(r: Cow<'a, DisplayNameRef>) -> Self
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<'a> From<DisplayName> for Cow<'a, DisplayNameRef>
impl<'a> From<DisplayName> for Cow<'a, DisplayNameRef>
source§fn from(owned: DisplayName) -> Self
fn from(owned: DisplayName) -> Self
Converts to this type from the input type.
source§impl From<DisplayName> for String
impl From<DisplayName> for String
source§fn from(s: DisplayName) -> Self
fn from(s: DisplayName) -> Self
Converts to this type from the input type.
source§impl From<String> for DisplayName
impl From<String> for DisplayName
source§impl FromStr for DisplayName
impl FromStr for DisplayName
source§impl Hash for DisplayName
impl Hash for DisplayName
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 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 DisplayName
impl Ord for DisplayName
source§impl PartialEq<&DisplayNameRef> for DisplayName
impl PartialEq<&DisplayNameRef> for DisplayName
source§fn eq(&self, other: &&DisplayNameRef) -> bool
fn eq(&self, other: &&DisplayNameRef) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq<DisplayName> for &DisplayNameRef
impl PartialEq<DisplayName> for &DisplayNameRef
source§fn eq(&self, other: &DisplayName) -> bool
fn eq(&self, other: &DisplayName) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq<DisplayName> for DisplayName
impl PartialEq<DisplayName> for DisplayName
source§fn eq(&self, other: &DisplayName) -> bool
fn eq(&self, other: &DisplayName) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq<DisplayName> for DisplayNameRef
impl PartialEq<DisplayName> for DisplayNameRef
source§fn eq(&self, other: &DisplayName) -> bool
fn eq(&self, other: &DisplayName) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq<DisplayNameRef> for DisplayName
impl PartialEq<DisplayNameRef> for DisplayName
source§fn eq(&self, other: &DisplayNameRef) -> bool
fn eq(&self, other: &DisplayNameRef) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<DisplayName> for DisplayName
impl PartialOrd<DisplayName> for DisplayName
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for DisplayName
Available on crate feature serde
only.
impl Serialize for DisplayName
Available on crate feature
serde
only.source§impl<'zf> ZeroFrom<'zf, DisplayName> for &'zf DisplayNameRef
Available on crate feature zerofrom
only.
impl<'zf> ZeroFrom<'zf, DisplayName> for &'zf DisplayNameRef
Available on crate feature
zerofrom
only.source§fn zero_from(other: &'zf DisplayName) -> Self
fn zero_from(other: &'zf DisplayName) -> Self
Clone the other
C
into a struct that may retain references into C
.impl Eq for DisplayName
impl StructuralEq for DisplayName
impl StructuralPartialEq for DisplayName
Auto Trait Implementations§
impl RefUnwindSafe for DisplayName
impl Send for DisplayName
impl Sync for DisplayName
impl Unpin for DisplayName
impl UnwindSafe for DisplayName
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