pub struct CopyObjectOptions {Show 14 fields
pub forbid_overwrite: Option<bool>,
pub source_version_id: Option<String>,
pub copy_source_if_match: Option<String>,
pub copy_source_if_none_match: Option<String>,
pub copy_source_if_unmodified_since: Option<String>,
pub copy_source_if_modified_since: Option<String>,
pub metadata_directive: Option<MetadataDirective>,
pub metadata: HashMap<String, String>,
pub server_side_encryption: Option<ServerSideEncryptionAlgorithm>,
pub server_side_encryption_key_id: Option<String>,
pub object_acl: Option<ObjectAcl>,
pub storage_class: Option<StorageClass>,
pub tags: HashMap<String, String>,
pub tag_directive: Option<TagDirective>,
}Expand description
Options for copying objects
Official document: https://help.aliyun.com/zh/oss/developer-reference/copyobject
Fields§
§forbid_overwrite: Option<bool>指定 CopyObject 操作时是否覆盖同名目标 Object。
当目标 Bucket 处于已开启或已暂停版本控制状态时,x-oss-forbid-overwrite 请求 Header 设置无效,即允许覆盖同名Object。
- 未指定
x-oss-forbid-overwrite或者指定x-oss-forbid-overwrite为false时,表示允许覆盖同名目标 Object。 - 指定
x-oss-forbid-overwrite为true时,表示禁止覆盖同名 Object。
设置x-oss-forbid-overwrite 请求 Header 会导致 QPS 处理性能下降,
如果您有大量的操作需要使用 x-oss-forbid-overwrite 请求 Header(QPS>1000),请联系技术支持,避免影响您的业务。
source_version_id: Option<String>默认复制源 Object 的当前版本。如果需要复制指定的版本,请设置此参数
copy_source_if_match: Option<String>如果源 Object 的 ETag 值和您提供的 ETag 相等,则执行拷贝操作,并返回 200 OK。
copy_source_if_none_match: Option<String>如果源 Object 的 ETag 值和您提供的 ETag 不相等,则执行拷贝操作,并返回 200 OK。
copy_source_if_unmodified_since: Option<String>如果指定的时间等于或者晚于文件实际修改时间,则正常拷贝文件,并返回 200 OK。
e.g. Mon, 11 May 2020 08:16:23 GMT
copy_source_if_modified_since: Option<String>如果指定的时间早于文件实际修改时间,则正常拷贝文件,并返回200 OK。
e.g. Mon, 11 May 2020 08:16:23 GMT
metadata_directive: Option<MetadataDirective>指定如何设置目标 Object 的元数据。
metadata: HashMap<String, String>Key 以 x-oss-meta- 开头
server_side_encryption: Option<ServerSideEncryptionAlgorithm>§server_side_encryption_key_id: Option<String>§object_acl: Option<ObjectAcl>指定 OSS 创建目标 Object 时的访问权限。
storage_class: Option<StorageClass>指定 OSS 创建目标 Object 时的存储类型
tag_directive: Option<TagDirective>Trait Implementations§
Source§impl Clone for CopyObjectOptions
impl Clone for CopyObjectOptions
Source§fn clone(&self) -> CopyObjectOptions
fn clone(&self) -> CopyObjectOptions
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 moreSource§impl Debug for CopyObjectOptions
impl Debug for CopyObjectOptions
Source§impl Default for CopyObjectOptions
impl Default for CopyObjectOptions
Source§fn default() -> CopyObjectOptions
fn default() -> CopyObjectOptions
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for CopyObjectOptions
impl<'de> Deserialize<'de> for CopyObjectOptions
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CopyObjectOptions
impl RefUnwindSafe for CopyObjectOptions
impl Send for CopyObjectOptions
impl Sync for CopyObjectOptions
impl Unpin for CopyObjectOptions
impl UnsafeUnpin for CopyObjectOptions
impl UnwindSafe for CopyObjectOptions
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