pub enum WriteStrategy {
Create {
output: CompressedPath,
},
Append {
path: PathBuf,
},
CopyOnWrite {
input: CompressedPath,
output: CompressedPath,
},
AtomicSwap {
path: PathBuf,
compression: CompressionFormat,
temp_path: PathBuf,
},
}Expand description
Describes how to write archive data based on input/output paths and compression.
Variants§
Create
Create a new archive from scratch. No existing archive to read.
Fields
§
output: CompressedPathAppend
Append to an existing uncompressed archive in-place. Just seek to end and write new records.
CopyOnWrite
Read from one location, write to another. Handles transcoding between compression formats.
AtomicSwap
Read compressed archive, write to temp, atomic swap. Required when source == dest AND compressed.
Trait Implementations§
Source§impl Clone for WriteStrategy
impl Clone for WriteStrategy
Source§fn clone(&self) -> WriteStrategy
fn clone(&self) -> WriteStrategy
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for WriteStrategy
impl RefUnwindSafe for WriteStrategy
impl Send for WriteStrategy
impl Sync for WriteStrategy
impl Unpin for WriteStrategy
impl UnwindSafe for WriteStrategy
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