[]Struct piston_window::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

impl Copy for ButtonArgs

impl Debug for ButtonArgs

impl<'de> Deserialize<'de> for ButtonArgs

impl Eq for ButtonArgs

impl From<ButtonArgs> for Input

impl Hash for ButtonArgs

impl Ord for ButtonArgs

impl PartialEq<ButtonArgs> for ButtonArgs

impl PartialOrd<ButtonArgs> for ButtonArgs

impl Serialize for ButtonArgs

impl StructuralEq for ButtonArgs

impl StructuralPartialEq for ButtonArgs

Auto Trait Implementations

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> Pointable for T

type Init = T

The type for initializers.

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.