#[non_exhaustive]pub enum ButtonCode {
DpadUp,
DpadDown,
DpadLeft,
DpadRight,
South,
East,
West,
North,
L1,
R1,
Start,
Select,
}Expand description
A logical control on a gamepad-style input surface.
Face buttons use direction-neutral South/East/West/North names
(the standard-gamepad convention) rather than any one vendor’s glyphs; a
backend maps them to its own button identity.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
DpadUp
D-pad up.
DpadDown
D-pad down.
DpadLeft
D-pad left.
DpadRight
D-pad right.
South
Bottom face button.
East
Right face button.
West
Left face button.
North
Top face button.
L1
Left shoulder / trigger.
R1
Right shoulder / trigger.
Start
Start / menu.
Select
Select / back.
Trait Implementations§
Source§impl Clone for ButtonCode
impl Clone for ButtonCode
Source§fn clone(&self) -> ButtonCode
fn clone(&self) -> ButtonCode
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ButtonCode
Source§impl Debug for ButtonCode
impl Debug for ButtonCode
Source§impl<'de> Deserialize<'de> for ButtonCode
impl<'de> Deserialize<'de> for ButtonCode
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ButtonCode
Source§impl Hash for ButtonCode
impl Hash for ButtonCode
impl IpcSafe for ButtonCode
Source§impl PartialEq for ButtonCode
impl PartialEq for ButtonCode
Source§impl Serialize for ButtonCode
impl Serialize for ButtonCode
impl StructuralPartialEq for ButtonCode
Auto Trait Implementations§
impl Freeze for ButtonCode
impl RefUnwindSafe for ButtonCode
impl Send for ButtonCode
impl Sync for ButtonCode
impl Unpin for ButtonCode
impl UnsafeUnpin for ButtonCode
impl UnwindSafe for ButtonCode
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