[][src]Enum sdl2::joystick::HatState

pub enum HatState {
    Centered,
    Up,
    Right,
    Down,
    Left,
    RightUp,
    RightDown,
    LeftUp,
    LeftDown,
}

This is represented in SDL2 as a bitfield but obviously not all combinations make sense: 5 for instance would mean up and down at the same time... To simplify things I turn it into an enum which is how the SDL2 docs present it anyway (using macros).

Variants

Centered
Up
Right
Down
Left
RightUp
RightDown
LeftUp
LeftDown

Methods

impl HatState[src]

pub fn from_raw(raw: u8) -> HatState[src]

pub fn to_raw(self) -> u8[src]

Trait Implementations

impl Clone for HatState[src]

impl Copy for HatState[src]

impl Debug for HatState[src]

impl Eq for HatState[src]

impl Hash for HatState[src]

impl PartialEq<HatState> for HatState[src]

impl StructuralEq for HatState[src]

impl StructuralPartialEq for HatState[src]

Auto Trait Implementations

impl RefUnwindSafe for HatState

impl Send for HatState

impl Sync for HatState

impl Unpin for HatState

impl UnwindSafe for HatState

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