#[repr(C)]pub struct State {
pub packet_number: u32,
pub gamepad: Gamepad,
}Expand description
[microsoft.com] XINPUT_STATE
Packet number + Gamepad state.
Fields§
§packet_number: u32State packet number.
The packet number indicates whether there have been any changes in the state of the controller.
If packet_number is the same in sequentially returned State structures, the controller state has not changed.
gamepad: GamepadThe gamepad state.
Methods from Deref<Target = Gamepad>§
pub const TRIGGER_THRESHOLD: u8 = 30u8
pub const LEFT_THUMB_DEADZONE: i16 = 7_849i16
pub const RIGHT_THUMB_DEADZONE: i16 = 8_689i16
Trait Implementations§
Source§impl AsMut<State> for XINPUT_STATE
Available on crate feature winapi-0-3 only.
impl AsMut<State> for XINPUT_STATE
Available on crate feature
winapi-0-3 only.Source§impl AsMut<XINPUT_STATE> for State
Available on crate feature winapi-0-3 only.
impl AsMut<XINPUT_STATE> for State
Available on crate feature
winapi-0-3 only.Source§fn as_mut(&mut self) -> &mut XINPUT_STATE
fn as_mut(&mut self) -> &mut XINPUT_STATE
Converts this type into a mutable reference of the (usually inferred) input type.
Source§impl AsRef<State> for XINPUT_STATE
Available on crate feature winapi-0-3 only.
impl AsRef<State> for XINPUT_STATE
Available on crate feature
winapi-0-3 only.Source§impl AsRef<XINPUT_STATE> for State
Available on crate feature winapi-0-3 only.
impl AsRef<XINPUT_STATE> for State
Available on crate feature
winapi-0-3 only.Source§fn as_ref(&self) -> &XINPUT_STATE
fn as_ref(&self) -> &XINPUT_STATE
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl From<State> for XINPUT_STATE
Available on crate feature winapi-0-3 only.
impl From<State> for XINPUT_STATE
Available on crate feature
winapi-0-3 only.Source§impl From<XINPUT_STATE> for State
Available on crate feature winapi-0-3 only.
impl From<XINPUT_STATE> for State
Available on crate feature
winapi-0-3 only.Source§fn from(value: XINPUT_STATE) -> Self
fn from(value: XINPUT_STATE) -> Self
Converts to this type from the input type.
impl Copy for State
impl Pod for State
Auto Trait Implementations§
impl Freeze for State
impl RefUnwindSafe for State
impl Send for State
impl Sync for State
impl Unpin for State
impl UnwindSafe for State
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
Source§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
Source§type Bits = T
type Bits = T
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.Source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self.