Enum twitch_types::color::NamedUserColor
source · pub enum NamedUserColor<'a> {
Show 16 variants
Blue,
BlueViolet,
CadetBlue,
Chocolate,
Coral,
DodgerBlue,
Firebrick,
GoldenRod,
Green,
HotPink,
OrangeRed,
Red,
SeaGreen,
SpringGreen,
YellowGreen,
Hex(Cow<'a, HexColorRef>),
}
Available on crate feature
color
only.Expand description
Colors a user can have
Variants§
Blue
Blue
BlueViolet
Blue Violet
CadetBlue
Cadet Blue
Chocolate
Chocolate
Coral
Coral
DodgerBlue
Dodger Blue
Firebrick
Firebrick
GoldenRod
Golden Rod
Green
Green
HotPink
Hot Pink
OrangeRed
Orange Red
Red
Red
SeaGreen
Sea Green
SpringGreen
Spring Green
YellowGreen
Yellow Green
Hex(Cow<'a, HexColorRef>)
A hex color
Implementations§
source§impl<'a> NamedUserColor<'a>
impl<'a> NamedUserColor<'a>
sourcepub fn to_owned(&self) -> NamedUserColor<'static>
pub fn to_owned(&self) -> NamedUserColor<'static>
Creates a owned NamedUserColor<’static> from a borrowed NamedUserColor<’a>
sourcepub fn all() -> &'static [NamedUserColor<'static>]
pub fn all() -> &'static [NamedUserColor<'static>]
All named colors
sourcepub fn as_hex(&'a self) -> &'a HexColorRef
pub fn as_hex(&'a self) -> &'a HexColorRef
Return this color in hex
Trait Implementations§
source§impl<'a> Arbitrary<'a> for NamedUserColor<'a>
Available on crate feature arbitrary
only.
impl<'a> Arbitrary<'a> for NamedUserColor<'a>
Available on crate feature
arbitrary
only.source§fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self>
Generate an arbitrary value of
Self
from the given unstructured data. Read moresource§fn size_hint(depth: usize) -> (usize, Option<usize>)
fn size_hint(depth: usize) -> (usize, Option<usize>)
Get a size hint for how many bytes out of an
Unstructured
this type
needs to construct itself. 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<'a> Clone for NamedUserColor<'a>
impl<'a> Clone for NamedUserColor<'a>
source§fn clone(&self) -> NamedUserColor<'a>
fn clone(&self) -> NamedUserColor<'a>
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<'a> Debug for NamedUserColor<'a>
impl<'a> Debug for NamedUserColor<'a>
source§impl<'de: 'a, 'a> Deserialize<'de> for NamedUserColor<'a>
impl<'de: 'a, 'a> Deserialize<'de> for NamedUserColor<'a>
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Display for NamedUserColor<'_>
impl Display for NamedUserColor<'_>
source§impl<'a> From<Cow<'a, HexColorRef>> for NamedUserColor<'a>
impl<'a> From<Cow<'a, HexColorRef>> for NamedUserColor<'a>
source§fn from(color: Cow<'a, HexColorRef>) -> Self
fn from(color: Cow<'a, HexColorRef>) -> Self
Converts to this type from the input type.
source§impl<'a> From<HexColor> for NamedUserColor<'a>
impl<'a> From<HexColor> for NamedUserColor<'a>
source§impl<'a> PartialEq for NamedUserColor<'a>
impl<'a> PartialEq for NamedUserColor<'a>
source§fn eq(&self, other: &NamedUserColor<'a>) -> bool
fn eq(&self, other: &NamedUserColor<'a>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for NamedUserColor<'_>
impl Serialize for NamedUserColor<'_>
source§impl<'a> TryFrom<&'a str> for NamedUserColor<'a>
impl<'a> TryFrom<&'a str> for NamedUserColor<'a>
source§impl<'zf, 'zf_inner> ZeroFrom<'zf, NamedUserColor<'zf_inner>> for NamedUserColor<'zf>
Available on crate feature zerofrom
only.
impl<'zf, 'zf_inner> ZeroFrom<'zf, NamedUserColor<'zf_inner>> for NamedUserColor<'zf>
Available on crate feature
zerofrom
only.source§fn zero_from(this: &'zf NamedUserColor<'zf_inner>) -> Self
fn zero_from(this: &'zf NamedUserColor<'zf_inner>) -> Self
Clone the other
C
into a struct that may retain references into C
.impl<'a> Eq for NamedUserColor<'a>
impl<'a> StructuralPartialEq for NamedUserColor<'a>
Auto Trait Implementations§
impl<'a> Freeze for NamedUserColor<'a>
impl<'a> RefUnwindSafe for NamedUserColor<'a>
impl<'a> Send for NamedUserColor<'a>
impl<'a> Sync for NamedUserColor<'a>
impl<'a> Unpin for NamedUserColor<'a>
impl<'a> UnwindSafe for NamedUserColor<'a>
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