Struct piston_window::controller::ControllerButton[][src]

pub struct ControllerButton {
    pub id: u32,
    pub button: u8,

Components of a controller button event. Not guaranteed consistent across backends.


id: u32

Which controller was the button on.

button: u8

Which button was pressed.


impl ControllerButton[src]

pub fn new(id: u32, button: u8) -> ControllerButton[src]

Create a new ControllerButton object. Intended for use by backends when emitting events.

Trait Implementations

impl Clone for ControllerButton[src]

impl Copy for ControllerButton[src]

impl Debug for ControllerButton[src]

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

impl Eq for ControllerButton[src]

impl From<ControllerButton> for Button[src]

impl Hash for ControllerButton[src]

impl Ord for ControllerButton[src]

impl PartialEq<ControllerButton> for ControllerButton[src]

impl PartialOrd<ControllerButton> for ControllerButton[src]

impl Serialize for ControllerButton[src]

impl StructuralEq for ControllerButton[src]

impl StructuralPartialEq for ControllerButton[src]

Auto Trait Implementations

impl RefUnwindSafe for ControllerButton

impl Send for ControllerButton

impl Sync for ControllerButton

impl Unpin for ControllerButton

impl UnwindSafe for ControllerButton

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.