Struct vcs_classic_hid::input::State [−][src]
A friendly representation of a game controller input state.
Fields
stick_position: StickPosition
The position of the stick
Whether the main button is down
Whether the secondary trigger is down
Whether the back button is down
Whether the menu/context button is down
Whether the Fuji (Atari) button is down
roll: u16
The absolute position of the rotational paddle, as a number between 0 and 1023
Implementations
impl State
[src]
pub fn from_report(data: &[u8]) -> Self
[src]
Obtain the controller’s state from the full report packet.
May panic if the data cannot represent an input report.
Trait Implementations
impl Clone for State
[src]
impl Copy for State
[src]
impl Debug for State
[src]
impl Default for State
[src]
impl PartialEq<State> for State
[src]
impl StructuralPartialEq for State
[src]
Auto Trait Implementations
impl RefUnwindSafe for State
impl Send for State
impl Sync for State
impl Unpin for State
impl UnwindSafe for State
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub 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.
pub 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>,