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

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

Methods

impl HatState
[src]

Trait Implementations

impl Copy for HatState
[src]

impl Clone for HatState
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Eq for HatState
[src]

impl PartialEq for HatState
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Hash for HatState
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl Debug for HatState
[src]

Formats the value using the given formatter.