Struct input::joystick::JoystickButton [] [src]

pub struct JoystickButton {
    pub id: i32,
    pub button: u8,
}

Components of a joystick button event. Not guaranteed consistent across backends.

Fields

id: i32

Which joystick was the button on.

button: u8

Which button was pressed.

Methods

impl JoystickButton
[src]

fn new(id: i32, button: u8) -> Self

Create a new JoystickButton object. Intended for use by backends when emitting events.

Trait Implementations

impl Hash for JoystickButton
[src]

fn hash<__H: Hasher>(&self, __arg_0: &mut __H)

Feeds this value into the state given, updating the hasher as necessary.

fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher
1.3.0

Feeds a slice of this type into the state provided.

impl Debug for JoystickButton
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Eq for JoystickButton
[src]

impl PartialEq for JoystickButton
[src]

fn eq(&self, __arg_0: &JoystickButton) -> bool

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, __arg_0: &JoystickButton) -> bool

This method tests for !=.

impl Encodable for JoystickButton
[src]

fn encode<__S: Encoder>(&self, __arg_0: &mut __S) -> Result<(), __S::Error>

impl Decodable for JoystickButton
[src]

fn decode<__D: Decoder>(__arg_0: &mut __D) -> Result<JoystickButton, __D::Error>

impl Clone for JoystickButton
[src]

fn clone(&self) -> JoystickButton

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

impl Copy for JoystickButton
[src]