Struct twitch_types::color::HexColorRef
source · pub struct HexColorRef(/* private fields */);
Available on crate feature
color
only.Expand description
A color in hex
Implementations§
source§impl HexColorRef
impl HexColorRef
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 HexColorRef
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 HexColorRef
sourcepub fn into_owned(self: Box<HexColorRef>) -> HexColor
pub fn into_owned(self: Box<HexColorRef>) -> HexColor
Converts a Box<HexColorRef>
into a HexColor
without copying or allocating
source§impl HexColorRef
impl HexColorRef
sourcepub fn as_cow(&self) -> Cow<'_, HexColorRef>
pub fn as_cow(&self) -> Cow<'_, HexColorRef>
Get a
Cow<'_, HexColorRef>
Trait Implementations§
source§impl AsRef<HexColorRef> for HexColor
impl AsRef<HexColorRef> for HexColor
source§fn as_ref(&self) -> &HexColorRef
fn as_ref(&self) -> &HexColorRef
Converts this type into a shared reference of the (usually inferred) input type.
source§impl AsRef<str> for HexColorRef
impl AsRef<str> for HexColorRef
source§impl Borrow<HexColorRef> for HexColor
impl Borrow<HexColorRef> for HexColor
source§fn borrow(&self) -> &HexColorRef
fn borrow(&self) -> &HexColorRef
Immutably borrows from an owned value. Read more
source§impl Borrow<str> for HexColorRef
impl Borrow<str> for HexColorRef
source§impl Debug for HexColorRef
impl Debug for HexColorRef
source§impl<'de: 'a, 'a> Deserialize<'de> for &'a HexColorRef
Available on crate feature serde
only.
impl<'de: 'a, 'a> Deserialize<'de> for &'a HexColorRef
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<HexColorRef>
Available on crate feature serde
only.
impl<'de> Deserialize<'de> for Box<HexColorRef>
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 HexColorRef
impl Display for HexColorRef
source§impl<'a> From<&'a &'a HexColorRef> for Collection<'a, HexColor>
impl<'a> From<&'a &'a HexColorRef> for Collection<'a, HexColor>
source§fn from(v: &'a &'a HexColorRef) -> Self
fn from(v: &'a &'a HexColorRef) -> Self
Converts to this type from the input type.
source§impl<'a, 'b: 'a> From<&'a Cow<'b, HexColorRef>> for &'a HexColorRef
impl<'a, 'b: 'a> From<&'a Cow<'b, HexColorRef>> for &'a HexColorRef
source§fn from(r: &'a Cow<'b, HexColorRef>) -> &'a HexColorRef
fn from(r: &'a Cow<'b, HexColorRef>) -> &'a HexColorRef
Converts to this type from the input type.
source§impl<'a> From<&'a HexColor> for &'a HexColorRef
impl<'a> From<&'a HexColor> for &'a HexColorRef
source§impl From<&HexColorRef> for Arc<HexColorRef>
impl From<&HexColorRef> for Arc<HexColorRef>
source§fn from(r: &HexColorRef) -> Self
fn from(r: &HexColorRef) -> Self
Converts to this type from the input type.
source§impl<'a> From<&'a HexColorRef> for Cow<'a, HexColorRef>
impl<'a> From<&'a HexColorRef> for Cow<'a, HexColorRef>
source§fn from(r: &'a HexColorRef) -> Self
fn from(r: &'a HexColorRef) -> Self
Converts to this type from the input type.
source§impl From<&HexColorRef> for HexColor
impl From<&HexColorRef> for HexColor
source§fn from(s: &HexColorRef) -> Self
fn from(s: &HexColorRef) -> Self
Converts to this type from the input type.
source§impl From<&HexColorRef> for Rc<HexColorRef>
impl From<&HexColorRef> for Rc<HexColorRef>
source§fn from(r: &HexColorRef) -> Self
fn from(r: &HexColorRef) -> Self
Converts to this type from the input type.
source§impl<'a> From<&'a String> for &'a HexColorRef
impl<'a> From<&'a String> for &'a HexColorRef
source§impl<'a> From<&'a str> for &'a HexColorRef
impl<'a> From<&'a str> for &'a HexColorRef
source§fn from(s: &'a str) -> &'a HexColorRef
fn from(s: &'a str) -> &'a HexColorRef
Converts to this type from the input type.
source§impl Hash for HexColorRef
impl Hash for HexColorRef
source§impl<'a> IntoCow<'a, HexColorRef> for &'a HexColor
impl<'a> IntoCow<'a, HexColorRef> for &'a HexColor
source§fn into_cow(self) -> Cow<'a, HexColorRef>
fn into_cow(self) -> Cow<'a, HexColorRef>
Make the cow with proper ownership, muu
source§impl<'a> IntoCow<'a, HexColorRef> for &'a HexColorRef
impl<'a> IntoCow<'a, HexColorRef> for &'a HexColorRef
source§fn into_cow(self) -> Cow<'a, HexColorRef>
fn into_cow(self) -> Cow<'a, HexColorRef>
Make the cow with proper ownership, muu
source§impl<'a> IntoCow<'a, HexColorRef> for HexColor
impl<'a> IntoCow<'a, HexColorRef> for HexColor
source§fn into_cow(self) -> Cow<'a, HexColorRef>
fn into_cow(self) -> Cow<'a, HexColorRef>
Make the cow with proper ownership, muu
source§impl Ord for HexColorRef
impl Ord for HexColorRef
source§impl PartialEq<&HexColorRef> for HexColor
impl PartialEq<&HexColorRef> for HexColor
source§fn eq(&self, other: &&HexColorRef) -> bool
fn eq(&self, other: &&HexColorRef) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq<HexColor> for &HexColorRef
impl PartialEq<HexColor> for &HexColorRef
source§impl PartialEq<HexColor> for HexColorRef
impl PartialEq<HexColor> for HexColorRef
source§impl PartialEq<HexColorRef> for HexColor
impl PartialEq<HexColorRef> for HexColor
source§fn eq(&self, other: &HexColorRef) -> bool
fn eq(&self, other: &HexColorRef) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq for HexColorRef
impl PartialEq for HexColorRef
source§fn eq(&self, other: &HexColorRef) -> bool
fn eq(&self, other: &HexColorRef) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for HexColorRef
impl PartialOrd for HexColorRef
source§fn partial_cmp(&self, other: &HexColorRef) -> Option<Ordering>
fn partial_cmp(&self, other: &HexColorRef) -> Option<Ordering>
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 HexColorRef
Available on crate feature serde
only.
impl Serialize for HexColorRef
Available on crate feature
serde
only.source§impl ToOwned for HexColorRef
impl ToOwned for HexColorRef
source§impl<'zf> ZeroFrom<'zf, HexColor> for &'zf HexColorRef
Available on crate feature zerofrom
only.
impl<'zf> ZeroFrom<'zf, HexColor> for &'zf HexColorRef
Available on crate feature
zerofrom
only.source§impl<'zf> ZeroFrom<'zf, HexColorRef> for &'zf HexColorRef
Available on crate feature zerofrom
only.
impl<'zf> ZeroFrom<'zf, HexColorRef> for &'zf HexColorRef
Available on crate feature
zerofrom
only.source§fn zero_from(other: &'zf HexColorRef) -> Self
fn zero_from(other: &'zf HexColorRef) -> Self
Clone the other
C
into a struct that may retain references into C
.