Skip to main content

CopyObjectOptions

Struct CopyObjectOptions 

Source
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-overwritefalse 时,表示允许覆盖同名目标 Object。
  • 指定 x-oss-forbid-overwritetrue 时,表示禁止覆盖同名 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 时的存储类型

§tags: HashMap<String, String>§tag_directive: Option<TagDirective>

Trait Implementations§

Source§

impl Clone for CopyObjectOptions

Source§

fn clone(&self) -> CopyObjectOptions

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CopyObjectOptions

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for CopyObjectOptions

Source§

fn default() -> CopyObjectOptions

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for CopyObjectOptions

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for CopyObjectOptions

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,