State

Struct State 

Source
pub struct State {
Show 20 fields pub header: Header, pub angular_velocity_zeroed: Vector3, pub angular_velocity_raw: Vector3, pub angular_velocity_covariance: [f64; 9], pub linear_acceleration_zeroed: Vector3, pub linear_acceleration_raw: Vector3, pub linear_acceleration_covariance: [f64; 9], pub nunchuk_acceleration_zeroed: Vector3, pub nunchuk_acceleration_raw: Vector3, pub nunchuk_joystick_zeroed: [f32; 2], pub nunchuk_joystick_raw: [f32; 2], pub buttons: [bool; 11], pub nunchuk_buttons: [bool; 2], pub leds: [bool; 4], pub rumble: bool, pub ir_tracking: Vec<IrSourceInfo>, pub raw_battery: f32, pub percent_battery: f32, pub zeroing_time: Time, pub errors: u64,
}

Fields§

§header: Header§angular_velocity_zeroed: Vector3§angular_velocity_raw: Vector3§angular_velocity_covariance: [f64; 9]§linear_acceleration_zeroed: Vector3§linear_acceleration_raw: Vector3§linear_acceleration_covariance: [f64; 9]§nunchuk_acceleration_zeroed: Vector3§nunchuk_acceleration_raw: Vector3§nunchuk_joystick_zeroed: [f32; 2]§nunchuk_joystick_raw: [f32; 2]§buttons: [bool; 11]§nunchuk_buttons: [bool; 2]§leds: [bool; 4]§rumble: bool§ir_tracking: Vec<IrSourceInfo>§raw_battery: f32§percent_battery: f32§zeroing_time: Time§errors: u64

Implementations§

Source§

impl State

Source

pub const INVALID: i8 = -1i8

Source

pub const INVALID_FLOAT: f32 = -1f32

Source

pub const MSG_BTN_1: i8 = 0i8

Source

pub const MSG_BTN_2: i8 = 1i8

Source

pub const MSG_BTN_A: i8 = 2i8

Source

pub const MSG_BTN_B: i8 = 3i8

Source

pub const MSG_BTN_PLUS: i8 = 4i8

Source

pub const MSG_BTN_MINUS: i8 = 5i8

Source

pub const MSG_BTN_LEFT: i8 = 6i8

Source

pub const MSG_BTN_RIGHT: i8 = 7i8

Source

pub const MSG_BTN_UP: i8 = 8i8

Source

pub const MSG_BTN_DOWN: i8 = 9i8

Source

pub const MSG_BTN_HOME: i8 = 10i8

Source

pub const MSG_BTN_Z: i8 = 0i8

Source

pub const MSG_BTN_C: i8 = 1i8

Source

pub const MSG_CLASSIC_BTN_X: i8 = 0i8

Source

pub const MSG_CLASSIC_BTN_Y: i8 = 1i8

Source

pub const MSG_CLASSIC_BTN_A: i8 = 2i8

Source

pub const MSG_CLASSIC_BTN_B: i8 = 3i8

Source

pub const MSG_CLASSIC_BTN_PLUS: i8 = 4i8

Source

pub const MSG_CLASSIC_BTN_MINUS: i8 = 5i8

Source

pub const MSG_CLASSIC_BTN_LEFT: i8 = 6i8

Source

pub const MSG_CLASSIC_BTN_RIGHT: i8 = 7i8

Source

pub const MSG_CLASSIC_BTN_UP: i8 = 8i8

Source

pub const MSG_CLASSIC_BTN_DOWN: i8 = 9i8

Source

pub const MSG_CLASSIC_BTN_HOME: i8 = 10i8

Source

pub const MSG_CLASSIC_BTN_L: i8 = 11i8

Source

pub const MSG_CLASSIC_BTN_R: i8 = 12i8

Source

pub const MSG_CLASSIC_BTN_ZL: i8 = 13i8

Source

pub const MSG_CLASSIC_BTN_ZR: i8 = 14i8

Trait Implementations§

Source§

impl Clone for State

Source§

fn clone(&self) -> State

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for State

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for State

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for State

Source§

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 PartialEq for State

Source§

fn eq(&self, other: &State) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for State

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Message for State

Source§

impl StructuralPartialEq for State

Auto Trait Implementations§

§

impl Freeze for State

§

impl RefUnwindSafe for State

§

impl Send for State

§

impl Sync for State

§

impl Unpin for State

§

impl UnwindSafe for State

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,