#[non_exhaustive]pub enum OutputPolicy {
CreateNew,
Replace,
}Expand description
Whether creating an output file may replace one that already exists.
There is no default: the caller states which it means.
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.
CreateNew
Refuse with
ArchiveError::OutputExists
when anything is at the path.
Replace
Replace a regular file, or a symlink at the path (the link itself, not its destination), atomically when the archive is complete.
Trait Implementations§
Source§impl Clone for OutputPolicy
impl Clone for OutputPolicy
impl Copy for OutputPolicy
Source§impl Debug for OutputPolicy
impl Debug for OutputPolicy
impl Eq for OutputPolicy
Source§impl PartialEq for OutputPolicy
impl PartialEq for OutputPolicy
impl StructuralPartialEq for OutputPolicy
Auto Trait Implementations§
impl Freeze for OutputPolicy
impl RefUnwindSafe for OutputPolicy
impl Send for OutputPolicy
impl Sync for OutputPolicy
impl Unpin for OutputPolicy
impl UnsafeUnpin for OutputPolicy
impl UnwindSafe for OutputPolicy
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.