pub struct ControllerData {Show 18 fields
pub left_x: i8,
pub left_y: i8,
pub right_x: i8,
pub right_y: i8,
pub l1: bool,
pub l2: bool,
pub r1: bool,
pub r2: bool,
pub up: bool,
pub down: bool,
pub left: bool,
pub right: bool,
pub x: bool,
pub y: bool,
pub a: bool,
pub b: bool,
pub battery_level: i32,
pub battery_capacity: i32,
}Expand description
Describes data from all controller inputs.
Fields§
§left_x: i8The x-axis of the left analog stick.
left_y: i8The y-axis of the left analog stick.
right_x: i8The x-axis of the right analog stick.
right_y: i8The y-axis of the right analog stick.
l1: boolThe top-left shoulder button.
l2: boolThe bottom-left shoulder button.
r1: boolThe top-right shoulder button.
r2: boolThe bottom-right shoulder button.
up: boolThe up directional button.
down: boolThe down directional button.
left: boolThe left directional button.
right: boolThe right directional button.
x: boolThe “X” button.
y: boolThe “Y” button.
a: boolThe “A” button.
b: boolThe “B” button.
battery_level: i32The battery level of the controller.
battery_capacity: i32The battery capacity of the controller.
Trait Implementations§
Source§impl Clone for ControllerData
impl Clone for ControllerData
Source§fn clone(&self) -> ControllerData
fn clone(&self) -> ControllerData
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 ControllerData
impl Debug for ControllerData
Source§impl Default for ControllerData
impl Default for ControllerData
Source§fn default() -> ControllerData
fn default() -> ControllerData
Returns the “default value” for a type. Read more
Source§impl PartialEq for ControllerData
impl PartialEq for ControllerData
impl Copy for ControllerData
impl Eq for ControllerData
impl StructuralPartialEq for ControllerData
Auto Trait Implementations§
impl Freeze for ControllerData
impl RefUnwindSafe for ControllerData
impl Send for ControllerData
impl Sync for ControllerData
impl Unpin for ControllerData
impl UnwindSafe for ControllerData
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