pub trait CredentialProvider:
DynClone
+ Debug
+ Sync
+ Send {
// Required method
fn get(&self, opts: GetOptions) -> Result<GotCredential, Error>;
// Provided method
fn async_get(
&self,
opts: GetOptions,
) -> Pin<Box<dyn Future<Output = Result<GotCredential, Error>> + Send + '_>> { ... }
}
Expand description
认证信息获取接口
Required Methods§
Sourcefn get(&self, opts: GetOptions) -> Result<GotCredential, Error>
fn get(&self, opts: GetOptions) -> Result<GotCredential, Error>
返回七牛认证信息
该方法的异步版本为 Self::async_get
。
Provided Methods§
Sourcefn async_get(
&self,
opts: GetOptions,
) -> Pin<Box<dyn Future<Output = Result<GotCredential, Error>> + Send + '_>>
fn async_get( &self, opts: GetOptions, ) -> Pin<Box<dyn Future<Output = Result<GotCredential, Error>> + Send + '_>>
异步返回七牛认证信息
Trait Implementations§
Source§impl<'clone> Clone for Box<dyn CredentialProvider + 'clone>
impl<'clone> Clone for Box<dyn CredentialProvider + 'clone>
Source§fn clone(&self) -> Box<dyn CredentialProvider + 'clone>
fn clone(&self) -> Box<dyn CredentialProvider + 'clone>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more