Struct launchy::launch_control::Color
source · pub struct Color { /* private fields */ }
Expand description
A 2-bit color, with only red and green components
Implementations§
source§impl Color
impl Color
pub const OFF: Color = _
pub const RED: Color = _
pub const GREEN: Color = _
pub const AMBER: Color = _
pub const DIM_GREEN: Color = _
pub const DIM_RED: Color = _
pub const ORANGE: Color = _
pub const YELLOW: Color = _
pub const BLACK: Color = Color::OFF
sourcepub fn new(red: u8, green: u8) -> Color
pub fn new(red: u8, green: u8) -> Color
Create a new color from the given red and green components.
Both values must be less than 4 (they are 2-bit values)
pub fn red(&self) -> u8
pub fn green(&self) -> u8
pub fn set_red(&mut self, red: u8)
pub fn set_green(&mut self, green: u8)
Trait Implementations§
source§impl PartialEq<Color> for Color
impl PartialEq<Color> for Color
impl Copy for Color
impl Eq for Color
impl StructuralEq for Color
impl StructuralPartialEq for Color
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§
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