pub struct ControllerAxisArgs {
pub id: u32,
pub axis: u8,
pub position: f64,
}
Expand description
Components of a controller axis move event. Not guaranteed consistent across backends.
Fields§
§id: u32
Which controller moved.
axis: u8
The axis that moved.
position: f64
Position of the controller. Usually [-1.0, 1.0], though backends may use a different range for various devices.
Implementations§
Trait Implementations§
Source§impl Clone for ControllerAxisArgs
impl Clone for ControllerAxisArgs
Source§fn clone(&self) -> ControllerAxisArgs
fn clone(&self) -> ControllerAxisArgs
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 ControllerAxisArgs
impl Debug for ControllerAxisArgs
Source§impl<'de> Deserialize<'de> for ControllerAxisArgs
impl<'de> Deserialize<'de> for ControllerAxisArgs
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<ControllerAxisArgs> for Input
impl From<ControllerAxisArgs> for Input
Source§fn from(args: ControllerAxisArgs) -> Self
fn from(args: ControllerAxisArgs) -> Self
Converts to this type from the input type.
Source§impl From<ControllerAxisArgs> for Motion
impl From<ControllerAxisArgs> for Motion
Source§fn from(args: ControllerAxisArgs) -> Self
fn from(args: ControllerAxisArgs) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ControllerAxisArgs
impl PartialEq for ControllerAxisArgs
Source§impl PartialOrd for ControllerAxisArgs
impl PartialOrd for ControllerAxisArgs
Source§impl Serialize for ControllerAxisArgs
impl Serialize for ControllerAxisArgs
impl Copy for ControllerAxisArgs
impl StructuralPartialEq for ControllerAxisArgs
Auto Trait Implementations§
impl Freeze for ControllerAxisArgs
impl RefUnwindSafe for ControllerAxisArgs
impl Send for ControllerAxisArgs
impl Sync for ControllerAxisArgs
impl Unpin for ControllerAxisArgs
impl UnwindSafe for ControllerAxisArgs
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