pub struct EventWriter<'a> { /* private fields */ }Expand description
Helper for writing a sequence of events to the uinput device.
Returned by UinputDevice::writer.
Implementations§
Source§impl<'a> EventWriter<'a>
impl<'a> EventWriter<'a>
Sourcepub fn write(self, events: &[InputEvent]) -> Result<Self>
pub fn write(self, events: &[InputEvent]) -> Result<Self>
Writes raw events to the device.
Events passed to this method may be buffered to improve performance.
Sourcepub fn slot(self, slot: impl TryInto<Slot>) -> Result<SlotWriter<'a>>
pub fn slot(self, slot: impl TryInto<Slot>) -> Result<SlotWriter<'a>>
Prepares for modification of a multi-touch slot.
This will publish an ABS_MT_SLOT event with the selected slot.
Returns an SlotWriter that can be used to modify slot.
Sourcepub fn set_key_repeat(self, rep: KeyRepeat) -> Result<Self>
pub fn set_key_repeat(self, rep: KeyRepeat) -> Result<Self>
Changes the device’s KeyRepeat configuration.
Requires that Builder::with_key_repeat was called to enable the autorepeat
functionality.
This will write 2 RepeatEvents: one with Repeat::PERIOD and one with
Repeat::DELAY. The uinput system will immediately echo both events back to the
UinputDevice, and to every connected evdev client.
Trait Implementations§
Source§impl<'a> Debug for EventWriter<'a>
impl<'a> Debug for EventWriter<'a>
Auto Trait Implementations§
impl<'a> Freeze for EventWriter<'a>
impl<'a> RefUnwindSafe for EventWriter<'a>
impl<'a> Send for EventWriter<'a>
impl<'a> Sync for EventWriter<'a>
impl<'a> Unpin for EventWriter<'a>
impl<'a> UnwindSafe for EventWriter<'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