pub struct GotUploadPolicy<'a>(_);
Expand description

获取的上传策略

该数据结构目前和上传策略相同,可以和上传策略相互转换,但之后可能会添加更多字段

Implementations

获取上传策略

获取上传策略的可变引用

转换为上传策略

Methods from Deref<Target = UploadPolicy>

存储空间约束

对象名称约束或对象名称前缀约束

是否是对象名称前缀约束

是否仅允许新增对象,不允许覆盖对象

是否启用 MIME 类型自动检测

上传凭证过期时间

Web 端文件上传成功后,浏览器执行 303 跳转的 URL

上传成功后,自定义七牛云最终返回给上传端的数据

上传成功后,七牛云向业务服务器发送 POST 请求的 URL 列表

上传成功后,七牛云向业务服务器发送回调请求时的 Host

上传成功后,七牛云向业务服务器发送回调请求时的内容

支持魔法变量自定义变量

上传成功后,七牛云向业务服务器发送回调请求时的 Content-Type

默认为 application/x-www-form-urlencoded,也可设置为 application/json

自定义对象名称

支持魔法变量自定义变量

是否忽略客户端指定的对象名称,强制使用自定义对象名称进行文件命名

限定上传文件尺寸的范围

返回的第一个元素为最小尺寸,第二个元素为最大尺寸,如果为 None 表示不限制,单位为字节

限定用户上传的文件类型

指定本字段值,七牛服务器会侦测文件内容以判断 MIME 类型,再用判断值跟指定值进行匹配, 匹配成功则允许上传,匹配失败则返回 403 状态码

文件类型

对象生命周期

精确到天

获取 JSON 格式的上传凭证

根据指定的上传策略字段获取相应的值

获取上传策略的字段迭代器

获取上传策略的字段值的迭代器

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

The resulting type after dereferencing.

Dereferences the value.

Mutably dereferences the value.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Converts self into T using Into<T>. Read more

Returns the argument unchanged.

Calls U::from(self).

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

Pipes by value. This is generally the method you want to use. Read more

Borrows self and passes that borrow into the pipe function. Read more

Mutably borrows self and passes that borrow into the pipe function. Read more

Borrows self, then passes self.borrow() into the pipe function. Read more

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more

Borrows self, then passes self.as_ref() into the pipe function.

Mutably borrows self, then passes self.as_mut() into the pipe function. Read more

Borrows self, then passes self.deref() into the pipe function.

Mutably borrows self, then passes self.deref_mut() into the pipe function. Read more

Should always be Self

Immutable access to a value. Read more

Mutable access to a value. Read more

Immutable access to the Borrow<B> of a value. Read more

Mutable access to the BorrowMut<B> of a value. Read more

Immutable access to the AsRef<R> view of a value. Read more

Mutable access to the AsMut<R> view of a value. Read more

Immutable access to the Deref::Target of a value. Read more

Mutable access to the Deref::Target of a value. Read more

Calls .tap() only in debug builds, and is erased in release builds.

Calls .tap_mut() only in debug builds, and is erased in release builds. Read more

Calls .tap_borrow() only in debug builds, and is erased in release builds. Read more

Calls .tap_borrow_mut() only in debug builds, and is erased in release builds. Read more

Calls .tap_ref() only in debug builds, and is erased in release builds. Read more

Calls .tap_ref_mut() only in debug builds, and is erased in release builds. Read more

Calls .tap_deref() only in debug builds, and is erased in release builds. Read more

Calls .tap_deref_mut() only in debug builds, and is erased in release builds. Read more

The resulting type after obtaining ownership.

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

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

Attempts to convert self into T using TryInto<T>. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.