#[non_exhaustive]pub enum Overwrite {
Error,
Skip,
Replace,
}Expand description
What to do when a destination entry already exists.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Error
An existing destination entry stops the operation with
io::ErrorKind::AlreadyExists.
Skip
An existing destination entry is left untouched and counted in
Summary::skipped.
Replace
An existing destination entry is replaced. Type conflicts resolve by removing the destination entry first: a directory tree is removed to make room for a file, and a symlink is removed as a link, leaving its target untouched.
Trait Implementations§
impl Copy for Overwrite
impl Eq for Overwrite
impl StructuralPartialEq for Overwrite
Auto Trait Implementations§
impl Freeze for Overwrite
impl RefUnwindSafe for Overwrite
impl Send for Overwrite
impl Sync for Overwrite
impl Unpin for Overwrite
impl UnsafeUnpin for Overwrite
impl UnwindSafe for Overwrite
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