pub struct UndoGroup<T> {
pub operations: Vec<T>,
}Expand description
A checkpoint marker for grouping operations
Use this to group multiple operations into a single undo unit.
§Example
ⓘ
// Start a group
history.begin_group();
// Multiple operations...
history.push(op1);
history.push(op2);
history.push(op3);
// End group - all ops become one undo unit
history.end_group();Fields§
§operations: Vec<T>Operations in the group
Implementations§
Source§impl<T> UndoGroup<T>
impl<T> UndoGroup<T>
Sourcepub fn into_operations(self) -> Vec<T>
pub fn into_operations(self) -> Vec<T>
Get the operations (consumes the group)
Sourcepub fn operations(&self) -> &[T]
pub fn operations(&self) -> &[T]
Get a reference to the operations
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for UndoGroup<T>
impl<T> RefUnwindSafe for UndoGroup<T>where
T: RefUnwindSafe,
impl<T> Send for UndoGroup<T>where
T: Send,
impl<T> Sync for UndoGroup<T>where
T: Sync,
impl<T> Unpin for UndoGroup<T>where
T: Unpin,
impl<T> UnsafeUnpin for UndoGroup<T>
impl<T> UnwindSafe for UndoGroup<T>where
T: UnwindSafe,
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