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, Global>> { ... }
}
Expand description

认证信息获取接口

Required Methods§

fn get(&self, opts: GetOptions) -> Result<GotCredential, Error>

返回七牛认证信息

该方法的异步版本为 Self::async_get

Provided Methods§

fn async_get( &self, opts: GetOptions ) -> Pin<Box<dyn Future<Output = Result<GotCredential, Error>> + Send, Global>>

异步返回七牛认证信息

Implementations on Foreign Types§

§

impl<'a, T> CredentialProvider for &'a Twhere T: 'a + CredentialProvider + ?Sized, &'a T: DynClone + Debug + Sync + Send,

§

fn get(&self, opts: GetOptions) -> Result<GotCredential, Error>

§

fn async_get( &self, opts: GetOptions ) -> Pin<Box<dyn Future<Output = Result<GotCredential, Error>> + Send, Global>>

§

impl<'a, T> CredentialProvider for &'a mut Twhere T: 'a + CredentialProvider + ?Sized, &'a mut T: DynClone + Debug + Sync + Send,

§

fn get(&self, opts: GetOptions) -> Result<GotCredential, Error>

§

fn async_get( &self, opts: GetOptions ) -> Pin<Box<dyn Future<Output = Result<GotCredential, Error>> + Send, Global>>

§

impl<T> CredentialProvider for Box<T, Global>where T: CredentialProvider + ?Sized, Box<T, Global>: DynClone + Debug + Sync + Send,

§

fn get(&self, opts: GetOptions) -> Result<GotCredential, Error>

§

fn async_get( &self, opts: GetOptions ) -> Pin<Box<dyn Future<Output = Result<GotCredential, Error>> + Send, Global>>

§

impl<T> CredentialProvider for Rc<T>where T: CredentialProvider + ?Sized, Rc<T>: DynClone + Debug + Sync + Send,

§

fn get(&self, opts: GetOptions) -> Result<GotCredential, Error>

§

fn async_get( &self, opts: GetOptions ) -> Pin<Box<dyn Future<Output = Result<GotCredential, Error>> + Send, Global>>

§

impl<T> CredentialProvider for Arc<T>where T: CredentialProvider + ?Sized, Arc<T>: DynClone + Debug + Sync + Send,

§

fn get(&self, opts: GetOptions) -> Result<GotCredential, Error>

§

fn async_get( &self, opts: GetOptions ) -> Pin<Box<dyn Future<Output = Result<GotCredential, Error>> + Send, Global>>

Implementors§

§

impl CredentialProvider for ChainCredentialsProvider

§

impl CredentialProvider for Credential

§

impl CredentialProvider for EnvCredentialProvider

§

impl CredentialProvider for GlobalCredentialProvider

§

impl CredentialProvider for GotCredential