[]Struct piston::controller::ControllerButton

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

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

Fields

id: u32

Which controller was the button on.

button: u8

Which button was pressed.

Implementations

impl ControllerButton

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

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

Trait Implementations

impl Clone for ControllerButton

impl Copy for ControllerButton

impl Debug for ControllerButton

impl<'de> Deserialize<'de> for ControllerButton

impl Eq for ControllerButton

impl From<ControllerButton> for Button

impl Hash for ControllerButton

impl Ord for ControllerButton

impl PartialEq<ControllerButton> for ControllerButton

impl PartialOrd<ControllerButton> for ControllerButton

impl Serialize for ControllerButton

impl StructuralEq for ControllerButton

impl StructuralPartialEq for ControllerButton

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> 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.