[−][src]Struct stdweb::web::GamepadButton
The state of an individual button on a gamepad device.
Methods
impl GamepadButton
[src]
pub fn pressed(&self) -> bool
[src]
Is the button currently pressed?
pub fn touched(&self) -> bool
[src]
Is the button currently touched?
MDN does not document this. Firefox supports it, but Chrome (as of v65) does not.
pub fn value(&self) -> f64
[src]
The amount which the button has been pressed, between 0.0 (not pressed), and 1.0 (fully pressed).
Trait Implementations
impl JsSerialize for GamepadButton
[src]
impl TryFrom<GamepadButton> for Reference
[src]
type Error = Void
The type returned in the event of a conversion error.
fn try_from(value: GamepadButton) -> Result<Self, Self::Error>
[src]
impl TryFrom<Reference> for GamepadButton
[src]
type Error = ConversionError
The type returned in the event of a conversion error.
fn try_from(reference: Reference) -> Result<Self, Self::Error>
[src]
impl<'_r> TryFrom<&'_r Reference> for GamepadButton
[src]
type Error = ConversionError
The type returned in the event of a conversion error.
fn try_from(reference: &Reference) -> Result<Self, Self::Error>
[src]
impl TryFrom<Value> for GamepadButton
[src]
type Error = ConversionError
The type returned in the event of a conversion error.
fn try_from(value: Value) -> Result<Self, Self::Error>
[src]
impl<'_r> TryFrom<&'_r Value> for GamepadButton
[src]
type Error = ConversionError
The type returned in the event of a conversion error.
fn try_from(value: &Value) -> Result<Self, Self::Error>
[src]
impl InstanceOf for GamepadButton
[src]
fn instance_of(reference: &Reference) -> bool
[src]
impl ReferenceType for GamepadButton
[src]
unsafe fn from_reference_unchecked(reference: Reference) -> Self
[src]
impl AsRef<Reference> for GamepadButton
[src]
impl From<GamepadButton> for Reference
[src]
fn from(value: GamepadButton) -> Self
[src]
impl Clone for GamepadButton
[src]
fn clone(&self) -> GamepadButton
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Eq for GamepadButton
[src]
impl PartialEq<GamepadButton> for GamepadButton
[src]
fn eq(&self, other: &GamepadButton) -> bool
[src]
fn ne(&self, other: &GamepadButton) -> bool
[src]
impl Debug for GamepadButton
[src]
Auto Trait Implementations
impl Send for GamepadButton
impl Sync for GamepadButton
impl Unpin for GamepadButton
impl UnwindSafe for GamepadButton
impl RefUnwindSafe for GamepadButton
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,