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
sourceimpl<'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
sourceimpl<'a> Clone for NamedUserColor<'a>
impl<'a> Clone for NamedUserColor<'a>
sourcefn clone(&self) -> NamedUserColor<'a>
fn clone(&self) -> NamedUserColor<'a>
Returns a copy of the value. Read more
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl<'a> Debug for NamedUserColor<'a>
impl<'a> Debug for NamedUserColor<'a>
sourceimpl<'de: 'a, 'a> Deserialize<'de> for NamedUserColor<'a>
impl<'de: 'a, 'a> Deserialize<'de> for NamedUserColor<'a>
sourcefn 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
sourceimpl Display for NamedUserColor<'_>
impl Display for NamedUserColor<'_>
sourceimpl<'a> From<Cow<'a, HexColorRef>> for NamedUserColor<'a>
impl<'a> From<Cow<'a, HexColorRef>> for NamedUserColor<'a>
sourcefn from(color: Cow<'a, HexColorRef>) -> Self
fn from(color: Cow<'a, HexColorRef>) -> Self
Converts to this type from the input type.
sourceimpl<'a> From<HexColor> for NamedUserColor<'a>
impl<'a> From<HexColor> for NamedUserColor<'a>
sourceimpl<'a> PartialEq<NamedUserColor<'a>> for NamedUserColor<'a>
impl<'a> PartialEq<NamedUserColor<'a>> for NamedUserColor<'a>
sourcefn eq(&self, other: &NamedUserColor<'a>) -> bool
fn eq(&self, other: &NamedUserColor<'a>) -> bool
sourceimpl Serialize for NamedUserColor<'_>
impl Serialize for NamedUserColor<'_>
sourceimpl<'a> TryFrom<&'a str> for NamedUserColor<'a>
impl<'a> TryFrom<&'a str> for NamedUserColor<'a>
impl<'a> Eq for NamedUserColor<'a>
impl<'a> StructuralEq for NamedUserColor<'a>
impl<'a> StructuralPartialEq for NamedUserColor<'a>
Auto Trait Implementations
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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more