Struct piston::controller::ControllerAxisArgs
source · 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 copy 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<ControllerAxisArgs, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>( __deserializer: __D ) -> Result<ControllerAxisArgs, <__D as Deserializer<'de>>::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) -> Input
fn from(args: ControllerAxisArgs) -> Input
Converts to this type from the input type.
source§impl From<ControllerAxisArgs> for Motion
impl From<ControllerAxisArgs> for Motion
source§fn from(args: ControllerAxisArgs) -> Motion
fn from(args: ControllerAxisArgs) -> Motion
Converts to this type from the input type.
source§impl PartialEq<ControllerAxisArgs> for ControllerAxisArgs
impl PartialEq<ControllerAxisArgs> for ControllerAxisArgs
source§fn eq(&self, other: &ControllerAxisArgs) -> bool
fn eq(&self, other: &ControllerAxisArgs) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<ControllerAxisArgs> for ControllerAxisArgs
impl PartialOrd<ControllerAxisArgs> for ControllerAxisArgs
source§fn partial_cmp(&self, other: &ControllerAxisArgs) -> Option<Ordering>
fn partial_cmp(&self, other: &ControllerAxisArgs) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for ControllerAxisArgs
impl Serialize for ControllerAxisArgs
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where __S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Copy for ControllerAxisArgs
impl StructuralPartialEq for ControllerAxisArgs
Auto Trait Implementations§
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