Struct fermium::events::SDL_SensorEvent
source · #[repr(C)]pub struct SDL_SensorEvent {
pub type_: SDL_EventType,
pub timestamp: u32,
pub which: i32,
pub data: [c_float; 6],
}
Expand description
Sensor event structure (event.sensor.*)
Fields§
§type_: SDL_EventType
Should always be SDL_SENSORUPDATE
timestamp: u32
In milliseconds, populated using SDL_GetTicks
.
which: i32
The instance ID of the sensor
data: [c_float; 6]
Up to 6 values from the sensor - additional values can be queried using
SDL_SensorGetData
.
Trait Implementations§
source§impl Clone for SDL_SensorEvent
impl Clone for SDL_SensorEvent
source§fn clone(&self) -> SDL_SensorEvent
fn clone(&self) -> SDL_SensorEvent
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 SDL_SensorEvent
impl Debug for SDL_SensorEvent
source§impl Default for SDL_SensorEvent
impl Default for SDL_SensorEvent
source§fn default() -> SDL_SensorEvent
fn default() -> SDL_SensorEvent
Returns the “default value” for a type. Read more
source§impl PartialEq<SDL_SensorEvent> for SDL_SensorEvent
impl PartialEq<SDL_SensorEvent> for SDL_SensorEvent
source§fn eq(&self, other: &SDL_SensorEvent) -> bool
fn eq(&self, other: &SDL_SensorEvent) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<SDL_SensorEvent> for SDL_SensorEvent
impl PartialOrd<SDL_SensorEvent> for SDL_SensorEvent
source§fn partial_cmp(&self, other: &SDL_SensorEvent) -> Option<Ordering>
fn partial_cmp(&self, other: &SDL_SensorEvent) -> 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 moreimpl Copy for SDL_SensorEvent
impl StructuralPartialEq for SDL_SensorEvent
Auto Trait Implementations§
impl RefUnwindSafe for SDL_SensorEvent
impl Send for SDL_SensorEvent
impl Sync for SDL_SensorEvent
impl Unpin for SDL_SensorEvent
impl UnwindSafe for SDL_SensorEvent
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