Struct piston_window::controller::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
pub fn clone(&self) -> ControllerAxisArgs
pub fn clone(&self) -> ControllerAxisArgs
Returns a copy of the value. Read more
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
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<ControllerAxisArgs, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
pub 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 Motion
impl From<ControllerAxisArgs> for Motion
pub fn from(args: ControllerAxisArgs) -> Motion
pub fn from(args: ControllerAxisArgs) -> Motion
Performs the conversion.
impl From<ControllerAxisArgs> for Input
impl From<ControllerAxisArgs> for Input
pub fn from(args: ControllerAxisArgs) -> Input
pub fn from(args: ControllerAxisArgs) -> Input
Performs the conversion.
impl PartialEq<ControllerAxisArgs> for ControllerAxisArgs
impl PartialEq<ControllerAxisArgs> for ControllerAxisArgs
pub fn eq(&self, other: &ControllerAxisArgs) -> bool
pub fn eq(&self, other: &ControllerAxisArgs) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
pub fn ne(&self, other: &ControllerAxisArgs) -> bool
pub fn ne(&self, other: &ControllerAxisArgs) -> bool
This method tests for !=
.
impl PartialOrd<ControllerAxisArgs> for ControllerAxisArgs
impl PartialOrd<ControllerAxisArgs> for ControllerAxisArgs
pub fn partial_cmp(&self, other: &ControllerAxisArgs) -> Option<Ordering>
pub fn partial_cmp(&self, other: &ControllerAxisArgs) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
impl Serialize for ControllerAxisArgs
impl Serialize for ControllerAxisArgs
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
pub 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
Mutably borrows from an owned value. Read more