pub enum JoystickPosition {
Up,
Down,
Left,
Right,
UpLeft,
DownLeft,
UpRight,
DownRight,
Middle,
}Expand description
Enum for joystick positions
Variants§
Implementations§
Source§impl JoystickPosition
Enum for joystick position (complexity: N enum values)
impl JoystickPosition
Enum for joystick position (complexity: N enum values)
This is a convenience enum with some overhead in that the status is usually conditionally dermined twice:
- When creating the enum with
new() - When matching the resulting enum in calling code
It is faster but more low-level to directly probe GameController
(see example)
pub const fn new(value: GameController) -> JoystickPosition
Auto Trait Implementations§
impl Freeze for JoystickPosition
impl RefUnwindSafe for JoystickPosition
impl Send for JoystickPosition
impl Sync for JoystickPosition
impl Unpin for JoystickPosition
impl UnwindSafe for JoystickPosition
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more