Struct input_linux::AutorepeatEvent
source · #[repr(C)]pub struct AutorepeatEvent {
pub time: EventTime,
pub kind: AutorepeatKind,
pub value: i32,
/* private fields */
}
Expand description
An event that configures the autorepeat behaviour of the input device.
Fields§
§time: EventTime
The timestamp associated with the event.
kind: AutorepeatKind
The kind of autorepeat event.
value: i32
The value of the event.
Implementations§
source§impl<'a> AutorepeatEvent
impl<'a> AutorepeatEvent
sourcepub const fn new(time: EventTime, kind: AutorepeatKind, value: i32) -> Self
pub const fn new(time: EventTime, kind: AutorepeatKind, 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 AutorepeatEvent
impl AsRef<InputEvent> for AutorepeatEvent
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 AutorepeatEvent
impl AsRef<input_event> for AutorepeatEvent
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 AutorepeatEvent
impl Clone for AutorepeatEvent
source§fn clone(&self) -> AutorepeatEvent
fn clone(&self) -> AutorepeatEvent
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 AutorepeatEvent
impl Debug for AutorepeatEvent
source§impl<'de> Deserialize<'de> for AutorepeatEvent
impl<'de> Deserialize<'de> for AutorepeatEvent
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 AutorepeatEvent> for &'a InputEvent
impl<'a> From<&'a AutorepeatEvent> for &'a InputEvent
source§fn from(event: &'a AutorepeatEvent) -> Self
fn from(event: &'a AutorepeatEvent) -> Self
Converts to this type from the input type.
source§impl<'a> From<&'a AutorepeatEvent> for EventRef<'a>
impl<'a> From<&'a AutorepeatEvent> for EventRef<'a>
source§fn from(event: &'a AutorepeatEvent) -> Self
fn from(event: &'a AutorepeatEvent) -> Self
Converts to this type from the input type.
source§impl<'a> From<&'a AutorepeatEvent> for InputEvent
impl<'a> From<&'a AutorepeatEvent> for InputEvent
source§fn from(event: &'a AutorepeatEvent) -> Self
fn from(event: &'a AutorepeatEvent) -> Self
Converts to this type from the input type.
source§impl<'a> From<&'a mut AutorepeatEvent> for EventMut<'a>
impl<'a> From<&'a mut AutorepeatEvent> for EventMut<'a>
source§fn from(event: &'a mut AutorepeatEvent) -> Self
fn from(event: &'a mut AutorepeatEvent) -> Self
Converts to this type from the input type.
source§impl From<AutorepeatEvent> for Event
impl From<AutorepeatEvent> for Event
source§fn from(event: AutorepeatEvent) -> Self
fn from(event: AutorepeatEvent) -> Self
Converts to this type from the input type.
source§impl From<AutorepeatEvent> for InputEvent
impl From<AutorepeatEvent> for InputEvent
source§fn from(event: AutorepeatEvent) -> Self
fn from(event: AutorepeatEvent) -> Self
Converts to this type from the input type.
source§impl GenericEvent for AutorepeatEvent
impl GenericEvent for AutorepeatEvent
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 AutorepeatEvent
impl Hash for AutorepeatEvent
source§impl Ord for AutorepeatEvent
impl Ord for AutorepeatEvent
source§fn cmp(&self, other: &AutorepeatEvent) -> Ordering
fn cmp(&self, other: &AutorepeatEvent) -> 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 AutorepeatEvent
impl PartialEq for AutorepeatEvent
source§impl PartialOrd for AutorepeatEvent
impl PartialOrd for AutorepeatEvent
source§impl Serialize for AutorepeatEvent
impl Serialize for AutorepeatEvent
source§impl<'a> TryFrom<&'a InputEvent> for &'a AutorepeatEvent
impl<'a> TryFrom<&'a InputEvent> for &'a AutorepeatEvent
§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 AutorepeatEvent
impl<'a> TryFrom<&'a mut InputEvent> for &'a mut AutorepeatEvent
§type Error = RangeError
type Error = RangeError
The type returned in the event of a conversion error.
source§impl TryFrom<InputEvent> for AutorepeatEvent
impl TryFrom<InputEvent> for AutorepeatEvent
§type Error = RangeError
type Error = RangeError
The type returned in the event of a conversion error.
impl Copy for AutorepeatEvent
impl Eq for AutorepeatEvent
impl StructuralPartialEq for AutorepeatEvent
Auto Trait Implementations§
impl Freeze for AutorepeatEvent
impl RefUnwindSafe for AutorepeatEvent
impl Send for AutorepeatEvent
impl Sync for AutorepeatEvent
impl Unpin for AutorepeatEvent
impl UnwindSafe for AutorepeatEvent
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: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
)