pub struct StaticUploadTokenProvider { /* private fields */ }
Expand description

静态上传凭证提供者

根据已经被生成好的上传凭证字符串生成上传凭证获取接口的实例,可以将上传凭证解析为 Access Token 和上传策略

Implementations§

构建一个静态上传凭证,只需要传入静态的上传凭证字符串即可

Examples found in repository?
src/upload_token.rs (line 347)
346
347
348
349
350
351
352
353
354
355
356
357
    fn from(s: T) -> Self {
        Self::new(s.into())
    }
}

impl FromStr for StaticUploadTokenProvider {
    type Err = Infallible;

    #[inline]
    fn from_str(s: &str) -> Result<Self, Self::Err> {
        Ok(Self::new(s))
    }

获取上传凭证字符串

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
Formats the value using the given formatter. Read more
Converts to this type from the input type.
The associated error which can be returned from parsing.
Parses a string s to return a value of this type. Read more
从上传凭证内获取 AccessKey Read more
从上传凭证内获取上传策略 Read more
生成字符串 Read more
Available on crate feature async only.
异步从上传凭证内获取 AccessKey
Available on crate feature async only.
异步从上传凭证内获取上传策略
Available on crate feature async only.
异步生成字符串

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

Returns the argument unchanged.

Calls U::from(self).

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

Should always be Self
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
Converts the given value to a String. 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.