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.
Which button was pressed.
Methods
impl ControllerButton
[src]
fn new(id: i32, button: u8) -> Self
[src]
Create a new ControllerButton object. Intended for use by backends when emitting events.
Trait Implementations
impl Copy for ControllerButton
[src]
impl Clone for ControllerButton
[src]
fn clone(&self) -> ControllerButton
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Decodable for ControllerButton
[src]
fn decode<__D: Decoder>(
__arg_0: &mut __D
) -> Result<ControllerButton, __D::Error>
[src]
__arg_0: &mut __D
) -> Result<ControllerButton, __D::Error>
Deserialize a value using a Decoder
.
impl Encodable for ControllerButton
[src]
fn encode<__S: Encoder>(&self, __arg_0: &mut __S) -> Result<(), __S::Error>
[src]
Serialize a value using an Encoder
.
impl PartialEq for ControllerButton
[src]
fn eq(&self, __arg_0: &ControllerButton) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &ControllerButton) -> bool
[src]
This method tests for !=
.