Struct piston_window::ButtonArgs[][src]

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

Button arguments.


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 (

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

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

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

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

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

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T> Pointable for T[src]

type Init = T

The type for initializers.

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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

The type returned in the event of a conversion error.