[−][src]Struct toggle_florp::Color
A simple wrapper for a color
Implementations
impl Color
[src]
#[must_use]pub fn random() -> Color
[src]
Generates a new random color
#[must_use]pub fn new(r: u8, g: u8, b: u8) -> Color
[src]
Generates a new color from the given r g b values
#[must_use]pub fn from_hash(s: &str) -> Color
[src]
Generates a new color from the given r g b values
#[must_use]pub fn from_message(s: &str) -> Color
[src]
If one wants to use this library to parse something from twitch, this is the method to do just that.
#[must_use]pub fn r(&self) -> u8
[src]
Returns the red part of the color
#[must_use]pub fn g(&self) -> u8
[src]
Returns the green part of the color
#[must_use]pub fn b(&self) -> u8
[src]
Returns the blue part of the color
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Color
impl Send for Color
impl Sync for Color
impl Unpin for Color
impl UnwindSafe for Color
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,