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

Which controller was the button on.

button

Which button was pressed.

Methods

impl ControllerButton

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

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

Trait Implementations

Derived Implementations

impl Hash for ControllerButton

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

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

impl Debug for ControllerButton

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

impl Eq for ControllerButton

impl PartialEq for ControllerButton

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

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

impl Encodable for ControllerButton

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

impl Decodable for ControllerButton

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

impl Clone for ControllerButton

fn clone(&self) -> ControllerButton

1.0.0fn clone_from(&mut self, source: &Self)

impl Copy for ControllerButton