pub struct MacroRecorder { /* private fields */ }Expand description
Records input events with timing into an InputMacro.
Call record_event for each event, then
finish to produce the final macro.
Implementations§
Source§impl MacroRecorder
impl MacroRecorder
Sourcepub fn with_terminal_size(self, width: u16, height: u16) -> Self
pub fn with_terminal_size(self, width: u16, height: u16) -> Self
Set the terminal size metadata.
Sourcepub fn record_event(&mut self, event: Event)
pub fn record_event(&mut self, event: Event)
Record an event at the current time.
The delay is measured from the previous event (or recording start).
Sourcepub fn record_event_with_delay(&mut self, event: Event, delay: Duration)
pub fn record_event_with_delay(&mut self, event: Event, delay: Duration)
Record an event with an explicit delay from the previous event.
Sourcepub fn event_count(&self) -> usize
pub fn event_count(&self) -> usize
Get the number of events recorded so far.
Sourcepub fn finish(self) -> InputMacro
pub fn finish(self) -> InputMacro
Finish recording and produce the macro.
Auto Trait Implementations§
impl Freeze for MacroRecorder
impl RefUnwindSafe for MacroRecorder
impl Send for MacroRecorder
impl Sync for MacroRecorder
impl Unpin for MacroRecorder
impl UnsafeUnpin for MacroRecorder
impl UnwindSafe for MacroRecorder
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