#[non_exhaustive]pub struct CopyOptions {
pub recursive: bool,
pub overwrite: bool,
pub expected_revision: Option<Revision>,
}Expand description
Options controlling a copy operation.
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.recursive: boolWhether directory descendants are copied.
overwrite: boolWhether an existing destination may be replaced.
expected_revision: Option<Revision>An optional optimistic precondition on the source node.
Implementations§
Source§impl CopyOptions
impl CopyOptions
Sourcepub const fn recursive(self, recursive: bool) -> Self
pub const fn recursive(self, recursive: bool) -> Self
Sets whether directory descendants are copied.
Sourcepub const fn overwrite(self, overwrite: bool) -> Self
pub const fn overwrite(self, overwrite: bool) -> Self
Sets whether an existing destination may be replaced.
Sourcepub const fn expected_revision(
self,
expected_revision: Option<Revision>,
) -> Self
pub const fn expected_revision( self, expected_revision: Option<Revision>, ) -> Self
Sets the optimistic revision precondition.
Trait Implementations§
Source§impl Clone for CopyOptions
impl Clone for CopyOptions
Source§fn clone(&self) -> CopyOptions
fn clone(&self) -> CopyOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for CopyOptions
Source§impl Debug for CopyOptions
impl Debug for CopyOptions
Source§impl Default for CopyOptions
impl Default for CopyOptions
Source§fn default() -> CopyOptions
fn default() -> CopyOptions
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for CopyOptions
impl<'de> Deserialize<'de> for CopyOptions
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for CopyOptions
Source§impl PartialEq for CopyOptions
impl PartialEq for CopyOptions
Source§impl Serialize for CopyOptions
impl Serialize for CopyOptions
impl StructuralPartialEq for CopyOptions
Auto Trait Implementations§
impl Freeze for CopyOptions
impl RefUnwindSafe for CopyOptions
impl Send for CopyOptions
impl Sync for CopyOptions
impl Unpin for CopyOptions
impl UnsafeUnpin for CopyOptions
impl UnwindSafe for CopyOptions
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