[][src]Struct input::ButtonArgs

pub struct ButtonArgs {
    pub state: ButtonState,
    pub button: Button,
    pub scancode: Option<i32>,
}

Button arguments.

Fields

state: ButtonState

New state of the button.

button: 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 Clone for ButtonArgs[src]

impl Copy for ButtonArgs[src]

impl Debug for ButtonArgs[src]

impl<'de> Deserialize<'de> for ButtonArgs[src]

impl Eq for ButtonArgs[src]

impl From<ButtonArgs> for Input[src]

impl Hash for ButtonArgs[src]

impl Ord for ButtonArgs[src]

impl PartialEq<ButtonArgs> for ButtonArgs[src]

impl PartialOrd<ButtonArgs> for ButtonArgs[src]

impl Serialize for ButtonArgs[src]

impl StructuralEq for ButtonArgs[src]

impl StructuralPartialEq for ButtonArgs[src]

Auto Trait Implementations

impl RefUnwindSafe for ButtonArgs

impl Send for ButtonArgs

impl Sync for ButtonArgs

impl Unpin for ButtonArgs

impl UnwindSafe for ButtonArgs

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.