pub struct UndoRedoManager<T> { /* private fields */ }Expand description
Combined undo/redo manager.
Implementations§
Source§impl<T: Clone> UndoRedoManager<T>
impl<T: Clone> UndoRedoManager<T>
Sourcepub fn undo(&mut self, current: T) -> Option<T>
pub fn undo(&mut self, current: T) -> Option<T>
Undo: move current state to redo stack and return previous state.
Sourcepub fn redo(&mut self, current: T) -> Option<T>
pub fn redo(&mut self, current: T) -> Option<T>
Redo: move current state to undo stack and return next state.
Sourcepub fn undo_count(&self) -> usize
pub fn undo_count(&self) -> usize
Get the number of undo states.
Sourcepub fn redo_count(&self) -> usize
pub fn redo_count(&self) -> usize
Get the number of redo states.
Trait Implementations§
Source§impl<T: Clone> Clone for UndoRedoManager<T>
impl<T: Clone> Clone for UndoRedoManager<T>
Source§impl<T: Debug> Debug for UndoRedoManager<T>
impl<T: Debug> Debug for UndoRedoManager<T>
Auto Trait Implementations§
impl<T> Freeze for UndoRedoManager<T>
impl<T> RefUnwindSafe for UndoRedoManager<T>
impl<T> Send for UndoRedoManager<T>
impl<T> Sync for UndoRedoManager<T>
impl<T> Unpin for UndoRedoManager<T>
impl<T> UnsafeUnpin for UndoRedoManager<T>
impl<T> UnwindSafe for UndoRedoManager<T>
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