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>

source

pub fn to_owned(&self) -> NamedUserColor<'static>

Creates a owned NamedUserColor<’static> from a borrowed NamedUserColor<’a>

source

pub fn all() -> &'static [NamedUserColor<'static>]

All named colors

source

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.
source§

fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self>

Generate an arbitrary value of Self from the given unstructured data. Read more
source§

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 more
source§

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 more
source§

impl<'a> Clone for NamedUserColor<'a>

source§

fn clone(&self) -> NamedUserColor<'a>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'a> Debug for NamedUserColor<'a>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de: 'a, 'a> Deserialize<'de> for NamedUserColor<'a>

source§

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<'_>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a> From<Cow<'a, HexColorRef>> for NamedUserColor<'a>

source§

fn from(color: Cow<'a, HexColorRef>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<HexColor> for NamedUserColor<'a>

source§

fn from(color: HexColor) -> Self

Converts to this type from the input type.
source§

impl<'a> PartialEq for NamedUserColor<'a>

source§

fn eq(&self, other: &NamedUserColor<'a>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for NamedUserColor<'_>

source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl<'a> TryFrom<&'a str> for NamedUserColor<'a>

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(s: &'a str) -> Result<Self, Self::Error>

Performs the conversion.
source§

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

Clone the other C into a struct that may retain references into C.
source§

impl<'a> Eq for NamedUserColor<'a>

source§

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> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,