#[non_exhaustive]pub struct CloneOptions {
pub overwrite: bool,
pub preserve: Vec<Preserve>,
}Expand description
Settings for clone_entry and clone_dir. Start from CloneOptions::default() and chain the
with_ methods.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.overwrite: boolReplace the content of a destination that differs. Without it such a destination fails
with EEXIST.
preserve: Vec<Preserve>Properties to copy besides data, mode and owner.
Implementations§
Source§impl CloneOptions
impl CloneOptions
Sourcepub fn with_overwrite(self, overwrite: bool) -> CloneOptions
pub fn with_overwrite(self, overwrite: bool) -> CloneOptions
Sets overwrite.
Sourcepub fn with_preserve(self, preserve: Vec<Preserve>) -> CloneOptions
pub fn with_preserve(self, preserve: Vec<Preserve>) -> CloneOptions
Sets preserve.
Trait Implementations§
Source§impl Clone for CloneOptions
impl Clone for CloneOptions
Source§impl Debug for CloneOptions
impl Debug for CloneOptions
Source§impl Default for CloneOptions
impl Default for CloneOptions
impl Eq for CloneOptions
Source§impl PartialEq for CloneOptions
impl PartialEq for CloneOptions
impl StructuralPartialEq for CloneOptions
Auto Trait Implementations§
impl Freeze for CloneOptions
impl RefUnwindSafe for CloneOptions
impl Send for CloneOptions
impl Sync for CloneOptions
impl Unpin for CloneOptions
impl UnsafeUnpin for CloneOptions
impl UnwindSafe for CloneOptions
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