Struct fermium::events::SDL_ControllerDeviceEvent
source · #[repr(C)]pub struct SDL_ControllerDeviceEvent {
pub type_: SDL_EventType,
pub timestamp: u32,
pub which: i32,
}
Expand description
Controller device event structure (event.cdevice.*)
Fields
type_: SDL_EventType
Should always be SDL_CONTROLLERDEVICEADDED
,
SDL_CONTROLLERDEVICEREMOVED
, or SDL_CONTROLLERDEVICEREMAPPED
timestamp: u32
In milliseconds, populated using SDL_GetTicks
.
which: i32
The joystick device index for the ADDED
event, instance id for the
REMOVED
or REMAPPED
event.
Trait Implementations
sourceimpl Clone for SDL_ControllerDeviceEvent
impl Clone for SDL_ControllerDeviceEvent
sourcefn clone(&self) -> SDL_ControllerDeviceEvent
fn clone(&self) -> SDL_ControllerDeviceEvent
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for SDL_ControllerDeviceEvent
impl Debug for SDL_ControllerDeviceEvent
sourceimpl Default for SDL_ControllerDeviceEvent
impl Default for SDL_ControllerDeviceEvent
sourcefn default() -> SDL_ControllerDeviceEvent
fn default() -> SDL_ControllerDeviceEvent
Returns the “default value” for a type. Read more
sourceimpl Hash for SDL_ControllerDeviceEvent
impl Hash for SDL_ControllerDeviceEvent
sourceimpl Ord for SDL_ControllerDeviceEvent
impl Ord for SDL_ControllerDeviceEvent
sourcefn cmp(&self, other: &SDL_ControllerDeviceEvent) -> Ordering
fn cmp(&self, other: &SDL_ControllerDeviceEvent) -> Ordering
1.21.0 · sourcefn 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
1.21.0 · sourcefn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<SDL_ControllerDeviceEvent> for SDL_ControllerDeviceEvent
impl PartialEq<SDL_ControllerDeviceEvent> for SDL_ControllerDeviceEvent
sourcefn eq(&self, other: &SDL_ControllerDeviceEvent) -> bool
fn eq(&self, other: &SDL_ControllerDeviceEvent) -> bool
sourceimpl PartialOrd<SDL_ControllerDeviceEvent> for SDL_ControllerDeviceEvent
impl PartialOrd<SDL_ControllerDeviceEvent> for SDL_ControllerDeviceEvent
sourcefn partial_cmp(&self, other: &SDL_ControllerDeviceEvent) -> Option<Ordering>
fn partial_cmp(&self, other: &SDL_ControllerDeviceEvent) -> Option<Ordering>
1.0.0 · sourcefn 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_ControllerDeviceEvent
impl Eq for SDL_ControllerDeviceEvent
impl StructuralEq for SDL_ControllerDeviceEvent
impl StructuralPartialEq for SDL_ControllerDeviceEvent
Auto Trait Implementations
impl RefUnwindSafe for SDL_ControllerDeviceEvent
impl Send for SDL_ControllerDeviceEvent
impl Sync for SDL_ControllerDeviceEvent
impl Unpin for SDL_ControllerDeviceEvent
impl UnwindSafe for SDL_ControllerDeviceEvent
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more