pub enum UndoableOperation {
FilesMoved {
moves: Vec<(PathBuf, PathBuf)>,
},
FilesCopied {
created: Vec<PathBuf>,
},
FilesTrashed {
paths: Vec<PathBuf>,
at: SystemTime,
},
FilesRenamed {
renames: Vec<(PathBuf, PathBuf)>,
},
FileCreated {
path: PathBuf,
},
DirectoryCreated {
path: PathBuf,
},
}Expand description
An operation that can be reversed.
Variants§
FilesMoved
(original, current) locations of moved items.
FilesCopied
Items created by a copy; undo moves them to the Trash.
FilesTrashed
Items moved to the Trash at at; restorable where the platform
exposes the Trash (Linux, Windows).
FilesRenamed
(original, current) paths of renamed items.
FileCreated
A file that is removed on undo only while still empty.
DirectoryCreated
A directory that is removed on undo only while still empty.
Implementations§
Source§impl UndoableOperation
impl UndoableOperation
Sourcepub fn item_count(&self) -> usize
pub fn item_count(&self) -> usize
Number of top-level items in the record.
Sourcepub fn touched_paths(&self) -> Vec<PathBuf>
pub fn touched_paths(&self) -> Vec<PathBuf>
Every path the operation, or undoing it, can change.
Sourcepub fn undo_description(&self) -> String
pub fn undo_description(&self) -> String
What undo will do, for display.
Trait Implementations§
Source§impl Clone for UndoableOperation
impl Clone for UndoableOperation
Source§impl Debug for UndoableOperation
impl Debug for UndoableOperation
impl Eq for UndoableOperation
Source§impl PartialEq for UndoableOperation
impl PartialEq for UndoableOperation
impl StructuralPartialEq for UndoableOperation
Auto Trait Implementations§
impl Freeze for UndoableOperation
impl RefUnwindSafe for UndoableOperation
impl Send for UndoableOperation
impl Sync for UndoableOperation
impl Unpin for UndoableOperation
impl UnsafeUnpin for UndoableOperation
impl UnwindSafe for UndoableOperation
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.