pub struct CachedUploadTokenProvider<P: Clone> { /* private fields */ }Expand description
缓存生成的上传凭证
内部存储另一个上传凭证获取接口的实例,该结构为之提供指定时间内的缓存,避免每次都要重新生成新的上传凭证。
Implementations
Trait Implementations
sourceimpl<P: Clone + Clone> Clone for CachedUploadTokenProvider<P>
impl<P: Clone + Clone> Clone for CachedUploadTokenProvider<P>
sourcefn clone(&self) -> CachedUploadTokenProvider<P>
fn clone(&self) -> CachedUploadTokenProvider<P>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresourceimpl<P: Debug + Clone> Debug for CachedUploadTokenProvider<P>
impl<P: Debug + Clone> Debug for CachedUploadTokenProvider<P>
sourceimpl<P: UploadTokenProvider + Clone> UploadTokenProvider for CachedUploadTokenProvider<P>
impl<P: UploadTokenProvider + Clone> UploadTokenProvider for CachedUploadTokenProvider<P>
sourcefn access_key(&self, opts: GetAccessKeyOptions) -> ParseResult<GotAccessKey>
fn access_key(&self, opts: GetAccessKeyOptions) -> ParseResult<GotAccessKey>
从上传凭证内获取 AccessKey Read more
sourcefn policy(&self, opts: GetPolicyOptions) -> ParseResult<GotUploadPolicy<'_>>
fn policy(&self, opts: GetPolicyOptions) -> ParseResult<GotUploadPolicy<'_>>
从上传凭证内获取上传策略 Read more
sourcefn to_token_string(&self, opts: ToStringOptions) -> ToStringResult<Cow<'_, str>>
fn to_token_string(&self, opts: ToStringOptions) -> ToStringResult<Cow<'_, str>>
生成字符串 Read more
sourcefn async_access_key(
&self,
opts: GetAccessKeyOptions
) -> Pin<Box<dyn Future<Output = ParseResult<GotAccessKey>> + Send + '_>>
fn async_access_key(
&self,
opts: GetAccessKeyOptions
) -> Pin<Box<dyn Future<Output = ParseResult<GotAccessKey>> + Send + '_>>
Available on crate feature
async only.异步从上传凭证内获取 AccessKey
sourcefn async_policy(
&self,
opts: GetPolicyOptions
) -> Pin<Box<dyn Future<Output = ParseResult<GotUploadPolicy<'_>>> + Send + '_>>
fn async_policy(
&self,
opts: GetPolicyOptions
) -> Pin<Box<dyn Future<Output = ParseResult<GotUploadPolicy<'_>>> + Send + '_>>
Available on crate feature
async only.异步从上传凭证内获取上传策略
sourcefn async_to_token_string(
&self,
opts: ToStringOptions
) -> Pin<Box<dyn Future<Output = ToStringResult<Cow<'_, str>>> + Send + '_>>
fn async_to_token_string(
&self,
opts: ToStringOptions
) -> Pin<Box<dyn Future<Output = ToStringResult<Cow<'_, str>>> + Send + '_>>
Available on crate feature
async only.异步生成字符串
Auto Trait Implementations
impl<P> !RefUnwindSafe for CachedUploadTokenProvider<P>
impl<P> Send for CachedUploadTokenProvider<P>where
P: Send,
impl<P> Sync for CachedUploadTokenProvider<P>where
P: Sync,
impl<P> Unpin for CachedUploadTokenProvider<P>where
P: Unpin,
impl<P> !UnwindSafe for CachedUploadTokenProvider<P>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more