pub struct Ds4LightbarColor {
pub red: u8,
pub green: u8,
pub blue: u8,
}Expand description
Represents an RGB color for the DualShock 4 lightbar.
This struct is part of a Ds4Notification and contains the color values
sent by the host to be displayed on the controller’s lightbar.
§Examples
use vigem_rust::controller::ds4::Ds4LightbarColor;
let color = Ds4LightbarColor::new(255, 0, 128); // A pink color
assert_eq!(color.red, 255);Fields§
§red: u8The red component of the color (0-255).
green: u8The green component of the color (0-255).
blue: u8The blue component of the color (0-255).
Implementations§
Trait Implementations§
Source§impl Clone for Ds4LightbarColor
impl Clone for Ds4LightbarColor
Source§fn clone(&self) -> Ds4LightbarColor
fn clone(&self) -> Ds4LightbarColor
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Ds4LightbarColor
impl Debug for Ds4LightbarColor
Source§impl Default for Ds4LightbarColor
impl Default for Ds4LightbarColor
Source§fn default() -> Ds4LightbarColor
fn default() -> Ds4LightbarColor
Returns the “default value” for a type. Read more
Source§impl PartialEq for Ds4LightbarColor
impl PartialEq for Ds4LightbarColor
impl Copy for Ds4LightbarColor
impl Eq for Ds4LightbarColor
impl StructuralPartialEq for Ds4LightbarColor
Auto Trait Implementations§
impl Freeze for Ds4LightbarColor
impl RefUnwindSafe for Ds4LightbarColor
impl Send for Ds4LightbarColor
impl Sync for Ds4LightbarColor
impl Unpin for Ds4LightbarColor
impl UnwindSafe for Ds4LightbarColor
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