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.
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: Hasher1.3.0
Feeds a slice of this type into the state provided.
impl Debug for JoystickButton[src]
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]
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