Struct piston_window::ControllerAxisArgs
[−]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
impl ControllerAxisArgs
impl ControllerAxisArgs
pub fn new(id: u32, axis: u8, position: f64) -> ControllerAxisArgs
pub fn new(id: u32, axis: u8, position: f64) -> ControllerAxisArgs
Create a new ControllerAxisArgs
object. Intended for use by backends when
emitting events.
Trait Implementations
impl Clone for ControllerAxisArgs
impl Clone for ControllerAxisArgs
fn clone(&self) -> ControllerAxisArgs
fn clone(&self) -> ControllerAxisArgs
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for ControllerAxisArgs
impl Debug for ControllerAxisArgs
impl<'de> Deserialize<'de> for ControllerAxisArgs
impl<'de> Deserialize<'de> for ControllerAxisArgs
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
impl From<ControllerAxisArgs> for Input
impl From<ControllerAxisArgs> for Input
fn from(args: ControllerAxisArgs) -> Input
fn from(args: ControllerAxisArgs) -> Input
Converts to this type from the input type.
impl From<ControllerAxisArgs> for Motion
impl From<ControllerAxisArgs> for Motion
fn from(args: ControllerAxisArgs) -> Motion
fn from(args: ControllerAxisArgs) -> Motion
Converts to this type from the input type.
impl PartialEq<ControllerAxisArgs> for ControllerAxisArgs
impl PartialEq<ControllerAxisArgs> for ControllerAxisArgs
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 ==
. Read more
fn ne(&self, other: &ControllerAxisArgs) -> bool
fn ne(&self, other: &ControllerAxisArgs) -> bool
This method tests for !=
.
impl PartialOrd<ControllerAxisArgs> for ControllerAxisArgs
impl PartialOrd<ControllerAxisArgs> for ControllerAxisArgs
fn partial_cmp(&self, other: &ControllerAxisArgs) -> Option<Ordering>
fn partial_cmp(&self, other: &ControllerAxisArgs) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn 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 more
impl Serialize for ControllerAxisArgs
impl Serialize for ControllerAxisArgs
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more