pub trait CredentialProvider:
DynClone
+ Debug
+ Sync
+ Send {
// Required method
fn get(&self, opts: GetOptions) -> IoResult<GotCredential>;
// Provided method
fn async_get(
&self,
opts: GetOptions,
) -> Pin<Box<dyn Future<Output = Result<GotCredential>> + Send + '_>> { ... }
}
Expand description
认证信息获取接口
Required Methods§
Sourcefn get(&self, opts: GetOptions) -> IoResult<GotCredential>
fn get(&self, opts: GetOptions) -> IoResult<GotCredential>
返回七牛认证信息
该方法的异步版本为 Self::async_get
。
Provided Methods§
Sourcefn async_get(
&self,
opts: GetOptions,
) -> Pin<Box<dyn Future<Output = Result<GotCredential>> + Send + '_>>
Available on crate feature async
only.
fn async_get( &self, opts: GetOptions, ) -> Pin<Box<dyn Future<Output = Result<GotCredential>> + Send + '_>>
async
only.异步返回七牛认证信息
Implementations on Foreign Types§
Source§impl<'a, T: 'a + CredentialProvider + ?Sized> CredentialProvider for &'a T
impl<'a, T: 'a + CredentialProvider + ?Sized> CredentialProvider for &'a T
fn get(&self, opts: GetOptions) -> IoResult<GotCredential>
Source§fn async_get(
&self,
opts: GetOptions,
) -> Pin<Box<dyn Future<Output = Result<GotCredential>> + Send + '_>>
fn async_get( &self, opts: GetOptions, ) -> Pin<Box<dyn Future<Output = Result<GotCredential>> + Send + '_>>
Available on crate feature
async
only.Source§impl<'a, T: 'a + CredentialProvider + ?Sized> CredentialProvider for &'a mut T
impl<'a, T: 'a + CredentialProvider + ?Sized> CredentialProvider for &'a mut T
fn get(&self, opts: GetOptions) -> IoResult<GotCredential>
Source§fn async_get(
&self,
opts: GetOptions,
) -> Pin<Box<dyn Future<Output = Result<GotCredential>> + Send + '_>>
fn async_get( &self, opts: GetOptions, ) -> Pin<Box<dyn Future<Output = Result<GotCredential>> + Send + '_>>
Available on crate feature
async
only.Source§impl<T: CredentialProvider + ?Sized> CredentialProvider for Box<T>
impl<T: CredentialProvider + ?Sized> CredentialProvider for Box<T>
fn get(&self, opts: GetOptions) -> IoResult<GotCredential>
Source§fn async_get(
&self,
opts: GetOptions,
) -> Pin<Box<dyn Future<Output = Result<GotCredential>> + Send + '_>>
fn async_get( &self, opts: GetOptions, ) -> Pin<Box<dyn Future<Output = Result<GotCredential>> + Send + '_>>
Available on crate feature
async
only.Source§impl<T: CredentialProvider + ?Sized> CredentialProvider for Rc<T>
impl<T: CredentialProvider + ?Sized> CredentialProvider for Rc<T>
fn get(&self, opts: GetOptions) -> IoResult<GotCredential>
Source§fn async_get(
&self,
opts: GetOptions,
) -> Pin<Box<dyn Future<Output = Result<GotCredential>> + Send + '_>>
fn async_get( &self, opts: GetOptions, ) -> Pin<Box<dyn Future<Output = Result<GotCredential>> + Send + '_>>
Available on crate feature
async
only.Source§impl<T: CredentialProvider + ?Sized> CredentialProvider for Arc<T>
impl<T: CredentialProvider + ?Sized> CredentialProvider for Arc<T>
fn get(&self, opts: GetOptions) -> IoResult<GotCredential>
Source§fn async_get(
&self,
opts: GetOptions,
) -> Pin<Box<dyn Future<Output = Result<GotCredential>> + Send + '_>>
fn async_get( &self, opts: GetOptions, ) -> Pin<Box<dyn Future<Output = Result<GotCredential>> + Send + '_>>
Available on crate feature
async
only.