[−][src]Struct stdweb::web::GamepadButton
The state of an individual button on a gamepad device.
Methods
impl GamepadButton
[src]
impl GamepadButton
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 JsSerialize for GamepadButton
impl TryFrom<GamepadButton> for Reference
[src]
impl TryFrom<GamepadButton> for Reference
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]
impl TryFrom<Reference> for GamepadButton
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]
impl<'_r> TryFrom<&'_r Reference> for GamepadButton
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]
impl TryFrom<Value> for GamepadButton
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]
impl<'_r> TryFrom<&'_r Value> for GamepadButton
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]
impl InstanceOf for GamepadButton
fn instance_of(reference: &Reference) -> bool | [src] |
impl ReferenceType for GamepadButton
[src]
impl ReferenceType for GamepadButton
unsafe fn from_reference_unchecked(reference: Reference) -> Self | [src] |
impl AsRef<Reference> for GamepadButton
[src]
impl AsRef<Reference> for GamepadButton
impl Clone for GamepadButton
[src]
impl Clone for GamepadButton
fn clone(&self) -> GamepadButton | [src] |
fn clone_from(&mut self, source: &Self) | 1.0.0 [src] |
Performs copy-assignment from source
. Read more
impl From<GamepadButton> for Reference
[src]
impl From<GamepadButton> for Reference
fn from(value: GamepadButton) -> Self | [src] |
impl Eq for GamepadButton
[src]
impl Eq for GamepadButton
impl PartialEq<GamepadButton> for GamepadButton
[src]
impl PartialEq<GamepadButton> for GamepadButton
fn eq(&self, other: &GamepadButton) -> bool | [src] |
fn ne(&self, other: &GamepadButton) -> bool | [src] |
impl Debug for GamepadButton
[src]
impl Debug for GamepadButton
Auto Trait Implementations
impl Send for GamepadButton
impl Send for GamepadButton
impl Sync for GamepadButton
impl Sync for GamepadButton
Blanket Implementations
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)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> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error> | [src] |
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T | [src] |
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId | [src] |