pub struct MacroRecorder { /* private fields */ }Expand description
Records edit actions into a Macro.
Implementations§
Source§impl MacroRecorder
impl MacroRecorder
Sourcepub fn record(&mut self, action: MacroAction)
pub fn record(&mut self, action: MacroAction)
Record an action (appended to the end). Does nothing if the recorder has been finished.
Sourcepub fn action_count(&self) -> usize
pub fn action_count(&self) -> usize
How many actions have been recorded so far.
Sourcepub fn is_recording(&self) -> bool
pub fn is_recording(&self) -> bool
Whether the recorder is still accepting actions.
Sourcepub fn undo_last(&mut self) -> Option<MacroAction>
pub fn undo_last(&mut self) -> Option<MacroAction>
Undo the last recorded action (pop).
Returns the removed action, or None if empty or not recording.
Trait Implementations§
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more