pub struct FileCopyWithProgressOptions {
pub colliding_file_behaviour: CollidingFileBehaviour,
pub read_buffer_size: usize,
pub write_buffer_size: usize,
pub progress_update_byte_interval: u64,
}Expand description
Options that influence the copy_file_with_progress function.
Fields§
§colliding_file_behaviour: CollidingFileBehaviourHow to behave when the destination file already exists.
read_buffer_size: usizeInternal buffer size used for reading the source file.
Defaults to 64 KiB.
write_buffer_size: usizeInternal buffer size used for writing to the destination file.
Defaults to 64 KiB.
progress_update_byte_interval: u64The smallest number of bytes copied between two consecutive progress reports.
Increase this value to make progress reports less frequent, and decrease it to make them more frequent. Keep in mind that decreasing the interval will likely come at some performance cost, depending on your progress handling closure.
Note that this is the minimum interval. The actual reporting interval may be larger!
Consult copy_file_with_progress documentation for more details.
Defaults to 512 KiB.
Trait Implementations§
Source§impl Clone for FileCopyWithProgressOptions
impl Clone for FileCopyWithProgressOptions
Source§fn clone(&self) -> FileCopyWithProgressOptions
fn clone(&self) -> FileCopyWithProgressOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FileCopyWithProgressOptions
impl Debug for FileCopyWithProgressOptions
Source§impl Default for FileCopyWithProgressOptions
impl Default for FileCopyWithProgressOptions
Source§fn default() -> Self
fn default() -> Self
Constructs relatively safe defaults for copying a file:
- aborts if there is an existing destination file (
CollidingFileBehaviour::Abort), - sets buffer size for reading and writing to 64 KiB, and
- sets the progress update closure call interval to 512 KiB.