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