pub enum EventMut<'a> {
Show 13 variants
Synchronize(&'a mut SynchronizeEvent),
Key(&'a mut KeyEvent),
Relative(&'a mut RelativeEvent),
Absolute(&'a mut AbsoluteEvent),
Switch(&'a mut SwitchEvent),
Misc(&'a mut MiscEvent),
Led(&'a mut LedEvent),
Autorepeat(&'a mut AutorepeatEvent),
Sound(&'a mut SoundEvent),
ForceFeedback(&'a mut ForceFeedbackEvent),
ForceFeedbackStatus(&'a mut ForceFeedbackStatusEvent),
UInput(&'a mut UInputEvent),
Unknown(&'a mut InputEvent),
}
Expand description
A mutable reference to an input event.
Variants§
Synchronize(&'a mut SynchronizeEvent)
Key(&'a mut KeyEvent)
Relative(&'a mut RelativeEvent)
Absolute(&'a mut AbsoluteEvent)
Switch(&'a mut SwitchEvent)
Misc(&'a mut MiscEvent)
Led(&'a mut LedEvent)
Autorepeat(&'a mut AutorepeatEvent)
Sound(&'a mut SoundEvent)
ForceFeedback(&'a mut ForceFeedbackEvent)
ForceFeedbackStatus(&'a mut ForceFeedbackStatusEvent)
UInput(&'a mut UInputEvent)
Unknown(&'a mut InputEvent)
Unknown event type.
Implementations§
Source§impl<'a> EventMut<'a>
impl<'a> EventMut<'a>
Sourcepub fn new(event: &'a mut InputEvent) -> Result<Self, RangeError>
pub fn new(event: &'a mut InputEvent) -> Result<Self, RangeError>
Wraps the generic InputEvent
into a mutable event.
Sourcepub fn as_event(&self) -> &InputEvent
pub fn as_event(&self) -> &InputEvent
Borrows the referenced event.
Sourcepub unsafe fn as_event_mut(self) -> &'a mut InputEvent
pub unsafe fn as_event_mut(self) -> &'a mut InputEvent
Mutably borrows the referenced event.
Trait Implementations§
Source§impl<'a> AsRef<InputEvent> for EventMut<'a>
impl<'a> AsRef<InputEvent> for EventMut<'a>
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<'a, 'b> From<&'a EventMut<'b>> for &'a InputEvent
impl<'a, 'b> From<&'a EventMut<'b>> for &'a InputEvent
Source§impl<'a> From<&'a mut AbsoluteEvent> for EventMut<'a>
impl<'a> From<&'a mut AbsoluteEvent> for EventMut<'a>
Source§fn from(event: &'a mut AbsoluteEvent) -> Self
fn from(event: &'a mut AbsoluteEvent) -> 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<'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<'a> From<&'a mut ForceFeedbackStatusEvent> for EventMut<'a>
impl<'a> From<&'a mut ForceFeedbackStatusEvent> for EventMut<'a>
Source§fn from(event: &'a mut ForceFeedbackStatusEvent) -> Self
fn from(event: &'a mut ForceFeedbackStatusEvent) -> Self
Converts to this type from the input type.
Source§impl<'a> From<&'a mut RelativeEvent> for EventMut<'a>
impl<'a> From<&'a mut RelativeEvent> for EventMut<'a>
Source§fn from(event: &'a mut RelativeEvent) -> Self
fn from(event: &'a mut RelativeEvent) -> Self
Converts to this type from the input type.
Source§impl<'a> From<&'a mut SoundEvent> for EventMut<'a>
impl<'a> From<&'a mut SoundEvent> for EventMut<'a>
Source§fn from(event: &'a mut SoundEvent) -> Self
fn from(event: &'a mut SoundEvent) -> Self
Converts to this type from the input type.
Source§impl<'a> From<&'a mut SwitchEvent> for EventMut<'a>
impl<'a> From<&'a mut SwitchEvent> for EventMut<'a>
Source§fn from(event: &'a mut SwitchEvent) -> Self
fn from(event: &'a mut SwitchEvent) -> Self
Converts to this type from the input type.
Source§impl<'a> From<&'a mut SynchronizeEvent> for EventMut<'a>
impl<'a> From<&'a mut SynchronizeEvent> for EventMut<'a>
Source§fn from(event: &'a mut SynchronizeEvent) -> Self
fn from(event: &'a mut SynchronizeEvent) -> Self
Converts to this type from the input type.
Source§impl<'a> From<&'a mut UInputEvent> for EventMut<'a>
impl<'a> From<&'a mut UInputEvent> for EventMut<'a>
Source§fn from(event: &'a mut UInputEvent) -> Self
fn from(event: &'a mut UInputEvent) -> Self
Converts to this type from the input type.
Source§impl<'a> From<EventMut<'a>> for &'a InputEvent
impl<'a> From<EventMut<'a>> for &'a InputEvent
impl<'a> Eq for EventMut<'a>
impl<'a> StructuralPartialEq for EventMut<'a>
Auto Trait Implementations§
impl<'a> Freeze for EventMut<'a>
impl<'a> RefUnwindSafe for EventMut<'a>
impl<'a> Send for EventMut<'a>
impl<'a> Sync for EventMut<'a>
impl<'a> Unpin for EventMut<'a>
impl<'a> !UnwindSafe for EventMut<'a>
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