pub struct XInputState {
pub buttons: u16,
pub left_trigger: u8,
pub right_trigger: u8,
pub thumb_lx: i16,
pub thumb_ly: i16,
pub thumb_rx: i16,
pub thumb_ry: i16,
}Expand description
Minimal XInput-like state we produce.
- Sticks are i16 in the standard range [-32768, 32767]
- Triggers are u8 [0..255]
- Buttons are packed into a u16 mask using XButtons.
Fields§
§left_trigger: u8§right_trigger: u8§thumb_lx: i16§thumb_ly: i16§thumb_rx: i16§thumb_ry: i16Trait Implementations§
Source§impl Clone for XInputState
impl Clone for XInputState
Source§fn clone(&self) -> XInputState
fn clone(&self) -> XInputState
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for XInputState
impl Debug for XInputState
Source§impl PartialEq for XInputState
impl PartialEq for XInputState
impl Eq for XInputState
impl StructuralPartialEq for XInputState
Auto Trait Implementations§
impl Freeze for XInputState
impl RefUnwindSafe for XInputState
impl Send for XInputState
impl Sync for XInputState
impl Unpin for XInputState
impl UnwindSafe for XInputState
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.