Struct twitch_irc::message::RGBColor
source · [−]Expand description
An RGB color, used to color chat user’s names.
This struct’s Display implementation formats the color in the way Twitch expects it for
the “Update User Chat Color” API method, i.e. uppercase hex RGB with a #, e.g.:
use twitch_irc::message::RGBColor;
let color = RGBColor {
r: 0x12,
g: 0x00,
b: 0x0F
};
assert_eq!(color.to_string(), "#12000F");Fields
r: u8Red component
g: u8Green component
b: u8Blue component
Trait Implementations
sourceimpl<'de> Deserialize<'de> for RGBColor
impl<'de> Deserialize<'de> for RGBColor
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
impl Copy for RGBColor
impl Eq for RGBColor
impl StructuralEq for RGBColor
impl StructuralPartialEq for RGBColor
Auto Trait Implementations
impl RefUnwindSafe for RGBColor
impl Send for RGBColor
impl Sync for RGBColor
impl Unpin for RGBColor
impl UnwindSafe for RGBColor
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
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.