Struct input::joystick::JoystickAxisArgs
[−]
[src]
pub struct JoystickAxisArgs {
pub id: i32,
pub axis: u8,
pub position: f64,
}Components of a joystick axis move event. Not guaranteed consistent across backends.
Fields
id: i32
Which joystick moved.
axis: u8
The axis that moved.
position: f64
Position of the joystick. Usually [-1.0, 1.0], though backends may use a different range for various devices.
Methods
impl JoystickAxisArgs[src]
fn new(id: i32, axis: u8, position: f64) -> Self
Create a new JoystickAxisArgs object. Intended for use by backends when emitting events.
Trait Implementations
impl Debug for JoystickAxisArgs[src]
impl PartialEq for JoystickAxisArgs[src]
fn eq(&self, __arg_0: &JoystickAxisArgs) -> bool
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, __arg_0: &JoystickAxisArgs) -> bool
This method tests for !=.
impl Encodable for JoystickAxisArgs[src]
impl Decodable for JoystickAxisArgs[src]
fn decode<__D: Decoder>(__arg_0: &mut __D) -> Result<JoystickAxisArgs, __D::Error>
impl Clone for JoystickAxisArgs[src]
fn clone(&self) -> JoystickAxisArgs
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0
Performs copy-assignment from source. Read more