Struct sdl2_sys::SDL_SensorEvent
source · #[repr(C)]pub struct SDL_SensorEvent {
pub type_: Uint32,
pub timestamp: Uint32,
pub which: Sint32,
pub data: [f32; 6],
pub timestamp_us: Uint64,
}
Expand description
\brief Sensor event structure (event.sensor.*)
Fields§
§type_: Uint32
< ::SDL_SENSORUPDATE
timestamp: Uint32
< In milliseconds, populated using SDL_GetTicks()
which: Sint32
< The instance ID of the sensor
data: [f32; 6]
< Up to 6 values from the sensor - additional values can be queried using SDL_SensorGetData()
timestamp_us: Uint64
< The timestamp of the sensor reading in microseconds, if the hardware provides this information.
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 moreimpl Copy for SDL_SensorEvent
Auto Trait Implementations§
impl Freeze for SDL_SensorEvent
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