pub struct GamepadButton(/* private fields */);
Expand description
The state of an individual button on a gamepad device.
Implementations§
Source§impl GamepadButton
impl GamepadButton
Sourcepub fn touched(&self) -> bool
pub fn touched(&self) -> bool
Is the button currently touched?
MDN does not document this. Firefox supports it, but Chrome (as of v65) does not.
Trait Implementations§
Source§impl AsRef<Reference> for GamepadButton
impl AsRef<Reference> for GamepadButton
Source§impl Clone for GamepadButton
impl Clone for GamepadButton
Source§fn clone(&self) -> GamepadButton
fn clone(&self) -> GamepadButton
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for GamepadButton
impl Debug for GamepadButton
Source§impl From<GamepadButton> for Reference
impl From<GamepadButton> for Reference
Source§fn from(value: GamepadButton) -> Self
fn from(value: GamepadButton) -> Self
Converts to this type from the input type.
Source§impl InstanceOf for GamepadButton
impl InstanceOf for GamepadButton
Source§impl PartialEq for GamepadButton
impl PartialEq for GamepadButton
Source§impl ReferenceType for GamepadButton
impl ReferenceType for GamepadButton
Source§unsafe fn from_reference_unchecked(reference: Reference) -> Self
unsafe fn from_reference_unchecked(reference: Reference) -> Self
Converts a given reference into a concrete reference-like wrapper.
Doesn’t do any type checking; highly unsafe to use!
Source§impl<'_r> TryFrom<&'_r Reference> for GamepadButton
impl<'_r> TryFrom<&'_r Reference> for GamepadButton
Source§impl<'_r> TryFrom<&'_r Value> for GamepadButton
impl<'_r> TryFrom<&'_r Value> for GamepadButton
Source§impl TryFrom<GamepadButton> for Reference
impl TryFrom<GamepadButton> for Reference
Source§impl TryFrom<Reference> for GamepadButton
impl TryFrom<Reference> for GamepadButton
Source§impl TryFrom<Value> for GamepadButton
impl TryFrom<Value> for GamepadButton
impl Eq for GamepadButton
impl JsSerialize for GamepadButton
impl StructuralPartialEq for GamepadButton
Auto Trait Implementations§
impl Freeze for GamepadButton
impl RefUnwindSafe for GamepadButton
impl Send for GamepadButton
impl Sync for GamepadButton
impl Unpin for GamepadButton
impl UnwindSafe for GamepadButton
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