pub enum HatState {
Centered,
Up,
Right,
Down,
Left,
RightUp,
RightDown,
LeftUp,
LeftDown,
}
Expand description
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
Implementations
Trait Implementations
impl Copy for HatState
impl Eq for HatState
impl StructuralEq for HatState
impl StructuralPartialEq for HatState
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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more