pub enum UndoStatus {
Undone,
Superseded,
Empty,
}Expand description
What UndoRedoManager::undo_if_head actually did.
The reason this exists: a “take that back” affordance offered for one
operation — the Undo button on a toast — cannot use plain undo(), which
pops whatever is on top. Anything pushed in the meantime (an autosave, a
second window, a background job) silently becomes the thing that gets undone
instead. Naming the operation and being told it is no longer the head is the
difference between a correct affordance and a data-loss bug.
Variants§
Undone
The named command was on top, and has been undone.
Superseded
Something else has been pushed since; nothing was undone.
Empty
The stack is empty; nothing was undone.
Trait Implementations§
Source§impl Clone for UndoStatus
impl Clone for UndoStatus
Source§fn clone(&self) -> UndoStatus
fn clone(&self) -> UndoStatus
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for UndoStatus
Source§impl Debug for UndoStatus
impl Debug for UndoStatus
impl Eq for UndoStatus
Source§impl Hash for UndoStatus
impl Hash for UndoStatus
Source§impl PartialEq for UndoStatus
impl PartialEq for UndoStatus
impl StructuralPartialEq for UndoStatus
Auto Trait Implementations§
impl Freeze for UndoStatus
impl RefUnwindSafe for UndoStatus
impl Send for UndoStatus
impl Sync for UndoStatus
impl Unpin for UndoStatus
impl UnsafeUnpin for UndoStatus
impl UnwindSafe for UndoStatus
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