pub struct CopyFile { /* private fields */ }Expand description
Builder for copy_file.
By default, parent directories are not created, existing files may be overwritten, backups are disabled, and dry-run mode is disabled.
Implementations§
Source§impl CopyFile
impl CopyFile
Sourcepub fn create_parent_dirs(self, create_parent_dirs: bool) -> Self
pub fn create_parent_dirs(self, create_parent_dirs: bool) -> Self
Sets whether missing parent directories for the destination should be created.
Sourcepub fn overwrite(self, overwrite: bool) -> Self
pub fn overwrite(self, overwrite: bool) -> Self
Sets whether an existing destination file may be overwritten.
Sourcepub fn backup_existing(self, backup_existing: bool) -> Self
pub fn backup_existing(self, backup_existing: bool) -> Self
Sets whether an existing destination file should be backed up first.
Sourcepub fn backup_suffix(self, backup_suffix: impl Into<String>) -> Self
pub fn backup_suffix(self, backup_suffix: impl Into<String>) -> Self
Sets the suffix appended to the destination path for backups.
Trait Implementations§
Auto Trait Implementations§
impl Forget for CopyFile
impl Freeze for CopyFile
impl Move for CopyFile
impl RefUnwindSafe for CopyFile
impl Send for CopyFile
impl Sync for CopyFile
impl Unpin for CopyFile
impl UnsafeUnpin for CopyFile
impl UnwindSafe for CopyFile
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