pub struct CopyOptions {
pub if_not_exists: bool,
pub if_match: Option<String>,
pub source_version: Option<String>,
pub source_content_length_hint: Option<u64>,
pub concurrent: usize,
pub chunk: Option<usize>,
}Expand description
Options for copy operations.
Fields§
§if_not_exists: boolSets the condition that copy operation will succeed only if target does not exist.
§Capability
Check crate::Capability::copy_with_if_not_exists before using this feature.
§Behavior
- If supported, the copy operation will only succeed if the target path does not exist
- Will return error if target already exists
- If not supported, the value will be ignored
This operation provides a way to ensure copy operations only create new resources without overwriting existing ones, useful for implementing “copy if not exists” logic.
if_match: Option<String>Sets the condition that copy operation will succeed only if the destination currently has the given ETag.
§Capability
Check crate::Capability::copy_with_if_match before using this feature.
§Behavior
- If supported, the copy operation will only succeed when the existing destination object’s ETag matches the given value.
source_version: Option<String>Copy from a specific source object version.
§Capability
Check crate::Capability::copy_with_source_version before using this feature.
§Behavior
- If supported, the copy operation will read from the specified source version instead of the current source object.
- Destination behavior follows normal copy semantics.
source_content_length_hint: Option<u64>Known content length of the source object.
This is an execution hint that allows OpenDAL to avoid extra metadata requests while planning copy operations. It must not be used as an object identity or consistency condition.
concurrent: usizeSets concurrent copy operations for this copier.
This is a best-effort execution option. Services that cannot split copy into concurrent server-side tasks can ignore it.
chunk: Option<usize>Sets chunk size for segmented copy operations.
§Capability
Check crate::Capability::copy_can_multi,
crate::Capability::copy_multi_min_size and
crate::Capability::copy_multi_max_size before using this feature.
This is a best-effort execution option. Services that support server-side segmented copy can use it as the target size for each copy step. Services that cannot split copy operations can ignore it.
Trait Implementations§
Source§impl Clone for CopyOptions
impl Clone for CopyOptions
Source§fn clone(&self) -> CopyOptions
fn clone(&self) -> CopyOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more