pub struct ControllerState {Show 21 fields
pub axis1: i32,
pub axis2: i32,
pub axis3: i32,
pub axis4: i32,
pub button_l1: bool,
pub button_l2: bool,
pub button_r1: bool,
pub button_r2: bool,
pub button_up: bool,
pub button_down: bool,
pub button_left: bool,
pub button_right: bool,
pub button_x: bool,
pub button_b: bool,
pub button_y: bool,
pub button_a: bool,
pub button_sel: bool,
pub battery_level: i32,
pub button_all: bool,
pub flags: i32,
pub battery_capacity: i32,
}
Expand description
The raw state of a VEX V5 controller.
Fields§
§axis1: i32
§axis2: i32
§axis3: i32
§axis4: i32
§battery_level: i32
§flags: i32
§battery_capacity: i32
Trait Implementations§
Source§impl Clone for ControllerState
impl Clone for ControllerState
Source§fn clone(&self) -> ControllerState
fn clone(&self) -> ControllerState
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 ControllerState
impl Debug for ControllerState
Source§impl Default for ControllerState
impl Default for ControllerState
Source§fn default() -> ControllerState
fn default() -> ControllerState
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ControllerState
impl<'de> Deserialize<'de> for ControllerState
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 Hash for ControllerState
impl Hash for ControllerState
Source§impl Ord for ControllerState
impl Ord for ControllerState
Source§fn cmp(&self, other: &ControllerState) -> Ordering
fn cmp(&self, other: &ControllerState) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ControllerState
impl PartialEq for ControllerState
Source§impl PartialOrd for ControllerState
impl PartialOrd for ControllerState
Source§impl Serialize for ControllerState
impl Serialize for ControllerState
impl Copy for ControllerState
impl Eq for ControllerState
impl StructuralPartialEq for ControllerState
Auto Trait Implementations§
impl Freeze for ControllerState
impl RefUnwindSafe for ControllerState
impl Send for ControllerState
impl Sync for ControllerState
impl Unpin for ControllerState
impl UnwindSafe for ControllerState
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