Struct input::controller::ControllerButton [] [src]

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

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

Fields

id: i32

Which controller was the button on.

button: u8

Which button was pressed.

Methods

impl ControllerButton
[src]

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

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

Trait Implementations

impl Hash for ControllerButton
[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 ControllerButton
[src]

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

Formats the value using the given formatter.

impl Eq for ControllerButton
[src]

impl PartialEq for ControllerButton
[src]

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

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

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

This method tests for !=.

impl Encodable for ControllerButton
[src]

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

impl Decodable for ControllerButton
[src]

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

impl Clone for ControllerButton
[src]

fn clone(&self) -> ControllerButton

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 ControllerButton
[src]