[][src]Struct gilrs::ev::state::GamepadState

pub struct GamepadState { /* fields omitted */ }

Cached gamepad state.

Methods

impl GamepadState
[src]

pub fn is_pressed(&self, btn: Code) -> bool
[src]

Returns true if given button is pressed. Returns false if there is no information about btn or it is not pressed.

pub fn value(&self, el: Code) -> f32
[src]

Returns value of el or 0.0 when there is no information about it. el can be either axis or button.

Important traits for ButtonDataIter<'a>
pub fn buttons(&self) -> ButtonDataIter
[src]

Iterate over buttons data.

Important traits for AxisDataIter<'a>
pub fn axes(&self) -> AxisDataIter
[src]

Iterate over axes data.

pub fn button_data(&self, btn: Code) -> Option<&ButtonData>
[src]

Returns button state and when it changed.

pub fn axis_data(&self, axis: Code) -> Option<&AxisData>
[src]

Returns axis state and when it changed.

Trait Implementations

impl Clone for GamepadState
[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for GamepadState
[src]

Auto Trait Implementations

Blanket Implementations

impl<T> From for T
[src]

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

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

type Owned = T

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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