pub struct ControllerState {Show 15 fields
pub left_stick: JoystickState,
pub right_stick: JoystickState,
pub button_a: ButtonState,
pub button_b: ButtonState,
pub button_x: ButtonState,
pub button_y: ButtonState,
pub button_up: ButtonState,
pub button_down: ButtonState,
pub button_left: ButtonState,
pub button_right: ButtonState,
pub button_l1: ButtonState,
pub button_l2: ButtonState,
pub button_r1: ButtonState,
pub button_r2: ButtonState,
pub button_power: ButtonState,
}
Expand description
Holds a snapshot of the state of the controller.
Returned by Controller::state
.
Fields§
§left_stick: JoystickState
Left Joystick
right_stick: JoystickState
Right Joystick
Button A
Button B
Button X
Button Y
Button Up
Button Down
Button Left
Button Right
Top Left Bumper
Bottom Left Bumper
Top Right Bumper
Bottom Right Bumper
Center Power Button
Trait Implementations§
Source§impl Clone for ControllerState
impl Clone for ControllerState
Source§fn clone(&self) -> ControllerState
fn clone(&self) -> ControllerState
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ControllerState
impl Debug for ControllerState
Source§impl Default for ControllerState
impl Default for ControllerState
Source§fn default() -> ControllerState
fn default() -> ControllerState
Returns the “default value” for a type. Read more
Source§impl PartialEq for ControllerState
impl PartialEq for ControllerState
impl Copy for ControllerState
impl Eq for ControllerState
impl StructuralPartialEq for ControllerState
Auto Trait Implementations§
impl Freeze for ControllerState
impl RefUnwindSafe for ControllerState
impl Send for ControllerState
impl Sync for ControllerState
impl Unpin for ControllerState
impl UnwindSafe for ControllerState
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