Struct input_linux::ForceFeedbackEvent
source · #[repr(C)]pub struct ForceFeedbackEvent {
pub time: EventTime,
pub kind: ForceFeedbackKind,
pub value: i32,
/* private fields */
}Expand description
An event that configures a force feedback effect.
Fields§
§time: EventTimeThe timestamp associated with the event.
kind: ForceFeedbackKindThe force effect.
value: i32The value or state associated with the effect.
Implementations§
source§impl<'a> ForceFeedbackEvent
impl<'a> ForceFeedbackEvent
sourcepub const fn new(time: EventTime, kind: ForceFeedbackKind, value: i32) -> Self
pub const fn new(time: EventTime, kind: ForceFeedbackKind, value: i32) -> Self
Creates a new event from the given code and value.
sourcepub unsafe fn from_event<E: AsRef<input_event>>(event: &E) -> &Self
pub unsafe fn from_event<E: AsRef<input_event>>(event: &E) -> &Self
Reinterpret a generic event without checking for validity.
sourcepub unsafe fn from_event_mut(event: &mut InputEvent) -> &mut Self
pub unsafe fn from_event_mut(event: &mut InputEvent) -> &mut Self
Reinterpret a mutable generic event without checking for validity.
sourcepub fn into_event(self) -> InputEvent
pub fn into_event(self) -> InputEvent
A generic input event.
sourcepub fn as_event(&self) -> &InputEvent
pub fn as_event(&self) -> &InputEvent
A generic input event reference.
sourcepub unsafe fn as_event_mut(&mut self) -> &mut InputEvent
pub unsafe fn as_event_mut(&mut self) -> &mut InputEvent
A mutable generic input event reference.
Trait Implementations§
source§impl AsRef<InputEvent> for ForceFeedbackEvent
impl AsRef<InputEvent> for ForceFeedbackEvent
source§fn as_ref(&self) -> &InputEvent
fn as_ref(&self) -> &InputEvent
Converts this type into a shared reference of the (usually inferred) input type.
source§impl AsRef<input_event> for ForceFeedbackEvent
impl AsRef<input_event> for ForceFeedbackEvent
source§fn as_ref(&self) -> &input_event
fn as_ref(&self) -> &input_event
Converts this type into a shared reference of the (usually inferred) input type.
source§impl Clone for ForceFeedbackEvent
impl Clone for ForceFeedbackEvent
source§fn clone(&self) -> ForceFeedbackEvent
fn clone(&self) -> ForceFeedbackEvent
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 ForceFeedbackEvent
impl Debug for ForceFeedbackEvent
source§impl<'de> Deserialize<'de> for ForceFeedbackEvent
impl<'de> Deserialize<'de> for ForceFeedbackEvent
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<'a> From<&'a ForceFeedbackEvent> for &'a InputEvent
impl<'a> From<&'a ForceFeedbackEvent> for &'a InputEvent
source§fn from(event: &'a ForceFeedbackEvent) -> Self
fn from(event: &'a ForceFeedbackEvent) -> Self
Converts to this type from the input type.
source§impl<'a> From<&'a ForceFeedbackEvent> for EventRef<'a>
impl<'a> From<&'a ForceFeedbackEvent> for EventRef<'a>
source§fn from(event: &'a ForceFeedbackEvent) -> Self
fn from(event: &'a ForceFeedbackEvent) -> Self
Converts to this type from the input type.
source§impl<'a> From<&'a ForceFeedbackEvent> for InputEvent
impl<'a> From<&'a ForceFeedbackEvent> for InputEvent
source§fn from(event: &'a ForceFeedbackEvent) -> Self
fn from(event: &'a ForceFeedbackEvent) -> Self
Converts to this type from the input type.
source§impl<'a> From<&'a mut ForceFeedbackEvent> for EventMut<'a>
impl<'a> From<&'a mut ForceFeedbackEvent> for EventMut<'a>
source§fn from(event: &'a mut ForceFeedbackEvent) -> Self
fn from(event: &'a mut ForceFeedbackEvent) -> Self
Converts to this type from the input type.
source§impl From<ForceFeedbackEvent> for Event
impl From<ForceFeedbackEvent> for Event
source§fn from(event: ForceFeedbackEvent) -> Self
fn from(event: ForceFeedbackEvent) -> Self
Converts to this type from the input type.
source§impl From<ForceFeedbackEvent> for InputEvent
impl From<ForceFeedbackEvent> for InputEvent
source§fn from(event: ForceFeedbackEvent) -> Self
fn from(event: ForceFeedbackEvent) -> Self
Converts to this type from the input type.
source§impl GenericEvent for ForceFeedbackEvent
impl GenericEvent for ForceFeedbackEvent
source§fn event_kind(&self) -> EventKind
fn event_kind(&self) -> EventKind
The event kind.
source§fn with_event(event: InputEvent) -> Result<Self, RangeError>
fn with_event(event: InputEvent) -> Result<Self, RangeError>
Interprets a generic event into a concrete event type.
source§unsafe fn with_event_unchecked(event: InputEvent) -> Self
unsafe fn with_event_unchecked(event: InputEvent) -> Self
Interprets a generic event into a concrete event type. Read more
source§fn from_ref(event: &InputEvent) -> Result<&Self, RangeError>
fn from_ref(event: &InputEvent) -> Result<&Self, RangeError>
Interprets a generic event reference into a concrete event type.
source§fn from_mut(event: &mut InputEvent) -> Result<&mut Self, RangeError>
fn from_mut(event: &mut InputEvent) -> Result<&mut Self, RangeError>
Interprets a mutable generic event reference into a concrete event type.
source§impl Hash for ForceFeedbackEvent
impl Hash for ForceFeedbackEvent
source§impl Ord for ForceFeedbackEvent
impl Ord for ForceFeedbackEvent
source§fn cmp(&self, other: &ForceFeedbackEvent) -> Ordering
fn cmp(&self, other: &ForceFeedbackEvent) -> 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 ForceFeedbackEvent
impl PartialEq for ForceFeedbackEvent
source§fn eq(&self, other: &ForceFeedbackEvent) -> bool
fn eq(&self, other: &ForceFeedbackEvent) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl PartialOrd for ForceFeedbackEvent
impl PartialOrd for ForceFeedbackEvent
source§fn partial_cmp(&self, other: &ForceFeedbackEvent) -> Option<Ordering>
fn partial_cmp(&self, other: &ForceFeedbackEvent) -> 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 moresource§impl Serialize for ForceFeedbackEvent
impl Serialize for ForceFeedbackEvent
source§impl<'a> TryFrom<&'a InputEvent> for &'a ForceFeedbackEvent
impl<'a> TryFrom<&'a InputEvent> for &'a ForceFeedbackEvent
§type Error = RangeError
type Error = RangeError
The type returned in the event of a conversion error.
source§impl<'a> TryFrom<&'a mut InputEvent> for &'a mut ForceFeedbackEvent
impl<'a> TryFrom<&'a mut InputEvent> for &'a mut ForceFeedbackEvent
§type Error = RangeError
type Error = RangeError
The type returned in the event of a conversion error.
source§impl TryFrom<InputEvent> for ForceFeedbackEvent
impl TryFrom<InputEvent> for ForceFeedbackEvent
§type Error = RangeError
type Error = RangeError
The type returned in the event of a conversion error.
impl Copy for ForceFeedbackEvent
impl Eq for ForceFeedbackEvent
impl StructuralPartialEq for ForceFeedbackEvent
Auto Trait Implementations§
impl Freeze for ForceFeedbackEvent
impl RefUnwindSafe for ForceFeedbackEvent
impl Send for ForceFeedbackEvent
impl Sync for ForceFeedbackEvent
impl Unpin for ForceFeedbackEvent
impl UnwindSafe for ForceFeedbackEvent
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
source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)