A friendly representation of a game controller input state.
The position of the stick
Whether the main button is down
Whether the secondary trigger is down
Whether the back button is down
Whether the menu/context button is down
Whether the Fuji (Atari) button is down
The absolute position of the rotational paddle, as a number between 0 and 1023
pub fn from_report(data: &[u8]) -> Self[src]
Obtain the controller’s state from the full report packet.
May panic if the data cannot represent an input report.
impl StructuralPartialEq for State[src]
impl RefUnwindSafe for State
impl UnwindSafe for State
type Owned = T
The resulting type after obtaining ownership.
pub fn clone_into(&self, target: &mut T)[src]
type Error = Infallible
The type returned in the event of a conversion error.