Struct input::ButtonArgs [−][src]
pub struct ButtonArgs {
pub state: ButtonState,
pub button: Button,
pub scancode: Option<i32>,
}Button arguments
Fields
state: ButtonState
New state of the button.
The button that changed state.
scancode: Option<i32>
An optional scancode that tells the physical layout of a keyboard key.
For other devices than keyboard, this is set to None.
Scancode follows SDL (https://wiki.libsdl.org/SDL_Scancode).
This is stored here to make Button equality check work with keyboard layouts.
Some window backends might not support scancodes. To test a window backend, use https://github.com/PistonDevelopers/piston-examples/tree/master/user_input
Trait Implementations
impl Copy for ButtonArgs[src]
impl Copy for ButtonArgsimpl Clone for ButtonArgs[src]
impl Clone for ButtonArgsfn clone(&self) -> ButtonArgs[src]
fn clone(&self) -> ButtonArgsReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl PartialEq for ButtonArgs[src]
impl PartialEq for ButtonArgsfn eq(&self, other: &ButtonArgs) -> bool[src]
fn eq(&self, other: &ButtonArgs) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &ButtonArgs) -> bool[src]
fn ne(&self, other: &ButtonArgs) -> boolThis method tests for !=.
impl Eq for ButtonArgs[src]
impl Eq for ButtonArgsimpl Hash for ButtonArgs[src]
impl Hash for ButtonArgsfn hash<__H: Hasher>(&self, state: &mut __H)[src]
fn hash<__H: Hasher>(&self, state: &mut __H)Feeds this value into the given [Hasher]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, Feeds a slice of this type into the given [Hasher]. Read more
impl Debug for ButtonArgs[src]
impl Debug for ButtonArgsfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl From<ButtonArgs> for Input[src]
impl From<ButtonArgs> for Inputfn from(args: ButtonArgs) -> Self[src]
fn from(args: ButtonArgs) -> SelfPerforms the conversion.
Auto Trait Implementations
impl Send for ButtonArgs
impl Send for ButtonArgsimpl Sync for ButtonArgs
impl Sync for ButtonArgs