pub trait UploadTokenProvider: DynClone + Debug + Sync + Send {
    fn access_key(&self, opts: GetAccessKeyOptions) -> ParseResult<GotAccessKey>;
    fn policy(&self, opts: GetPolicyOptions) -> ParseResult<GotUploadPolicy<'_>>;
    fn to_token_string(&self, opts: ToStringOptions) -> IoResult<Cow<'_, str>>;

    fn async_access_key(
        &self,
        opts: GetAccessKeyOptions
    ) -> Pin<Box<dyn Future<Output = ParseResult<GotAccessKey>> + Send + '_>> { ... } fn async_policy(
        &self,
        opts: GetPolicyOptions
    ) -> Pin<Box<dyn Future<Output = ParseResult<GotUploadPolicy<'_>>> + Send + '_>> { ... } fn async_to_token_string(
        &self,
        opts: ToStringOptions
    ) -> Pin<Box<dyn Future<Output = IoResult<Cow<'_, str>>> + Send + '_>> { ... } }
Expand description

上传凭证获取接口

可以阅读 https://developer.qiniu.com/kodo/manual/1208/upload-token 了解七牛安全机制。

Required Methods

从上传凭证内获取 AccessKey

该方法的异步版本为 Self::async_access_key

从上传凭证内获取上传策略

该方法的异步版本为 Self::async_policy

生成字符串

该方法的异步版本为 Self::async_to_token_string

Provided Methods

Available on crate feature async only.

异步从上传凭证内获取 AccessKey

Available on crate feature async only.

异步从上传凭证内获取上传策略

Available on crate feature async only.

异步生成字符串

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Implementations on Foreign Types

Available on crate feature async only.
Available on crate feature async only.
Available on crate feature async only.
Available on crate feature async only.
Available on crate feature async only.
Available on crate feature async only.
Available on crate feature async only.
Available on crate feature async only.
Available on crate feature async only.
Available on crate feature async only.
Available on crate feature async only.
Available on crate feature async only.
Available on crate feature async only.
Available on crate feature async only.
Available on crate feature async only.

Implementors