pub struct CopyOptions {
pub if_not_exists: bool,
pub if_match: 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 [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 [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_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 [Capability::copy_can_multi],
[Capability::copy_multi_min_size] and
[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 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CopyOptions
impl Debug for CopyOptions
Source§impl Default for CopyOptions
impl Default for CopyOptions
Source§fn default() -> CopyOptions
fn default() -> CopyOptions
Source§impl From<CopyOptions> for (OpCopy, OpCopier)
impl From<CopyOptions> for (OpCopy, OpCopier)
Source§fn from(value: CopyOptions) -> Self
fn from(value: CopyOptions) -> Self
Source§impl PartialEq for CopyOptions
impl PartialEq for CopyOptions
impl Eq 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 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.