[−][src]Struct stdweb::web::Gamepad
An individual gamepad/controller.
Methods
impl Gamepad[src]
impl Gamepadpub fn id(&self) -> String | [src] |
A string containing some information about this gamepad.
pub fn index(&self) -> i32 | [src] |
An auto-incrementing integer to uniquely identify a connected Gamepad.
pub fn connected(&self) -> bool | [src] |
Is this gamepad connected to the system, powered on, and usable?
pub fn timestamp(&self) -> f64 | [src] |
Monotonically increasing time this gamepad was updated.
pub fn mapping(&self) -> GamepadMappingType | [src] |
The mapping in use for this device.
pub fn axes(&self) -> Vec<f64> | [src] |
Array of values for all axes of the gamepad.
pub fn buttons(&self) -> Vec<GamepadButton> | [src] |
Array of button states for all buttons of the gamepad.
pub fn get_all() -> Vec<Option<Gamepad>> | [src] |
Retrieve all connected gamepads, in an array indexed by each gamepad's index member.
Chrome doesn't update Gamepad state automatically, you must call this function each frame.
Trait Implementations
impl JsSerialize for Gamepad[src]
impl JsSerialize for Gamepadimpl TryFrom<Gamepad> for Reference[src]
impl TryFrom<Gamepad> for Referencetype Error = Void
The type returned in the event of a conversion error.
fn try_from(value: Gamepad) -> Result<Self, Self::Error> | [src] |
impl TryFrom<Reference> for Gamepad[src]
impl TryFrom<Reference> for Gamepadtype 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 Gamepad[src]
impl<'_r> TryFrom<&'_r Reference> for Gamepadtype 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 Gamepad[src]
impl TryFrom<Value> for Gamepadtype 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 Gamepad[src]
impl<'_r> TryFrom<&'_r Value> for Gamepadtype 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 Gamepad[src]
impl InstanceOf for Gamepadfn instance_of(reference: &Reference) -> bool | [src] |
impl ReferenceType for Gamepad[src]
impl ReferenceType for Gamepadunsafe fn from_reference_unchecked(reference: Reference) -> Self | [src] |
impl From<Gamepad> for Reference[src]
impl From<Gamepad> for Referenceimpl Eq for Gamepad[src]
impl Eq for Gamepadimpl PartialEq<Gamepad> for Gamepad[src]
impl PartialEq<Gamepad> for Gamepadimpl AsRef<Reference> for Gamepad[src]
impl AsRef<Reference> for Gamepadimpl Clone for Gamepad[src]
impl Clone for Gamepadfn clone(&self) -> Gamepad | [src] |
fn clone_from(&mut self, source: &Self) | 1.0.0 [src] |
Performs copy-assignment from source. Read more
impl Debug for Gamepad[src]
impl Debug for GamepadAuto Trait Implementations
Blanket Implementations
impl<T> From for T[src]
impl<T> From for Timpl<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 = !
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> 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, 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
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> Any for T where
T: 'static + ?Sized, [src]
impl<T> Any for T where
T: 'static + ?Sized, fn get_type_id(&self) -> TypeId | [src] |