Trait CredentialProvider

Source
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§

Source

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

返回七牛认证信息

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

Provided Methods§

Source

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>

Source§

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)

Performs copy-assignment from source. Read more
Source§

impl<'clone> Clone for Box<dyn CredentialProvider + Send + 'clone>

Source§

fn clone(&self) -> Box<dyn CredentialProvider + Send + 'clone>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'clone> Clone for Box<dyn CredentialProvider + Send + Sync + 'clone>

Source§

fn clone(&self) -> Box<dyn CredentialProvider + Send + Sync + 'clone>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'clone> Clone for Box<dyn CredentialProvider + Sync + 'clone>

Source§

fn clone(&self) -> Box<dyn CredentialProvider + Sync + 'clone>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Implementations on Foreign Types§

Source§

impl<'a, T> CredentialProvider for &'a T

Source§

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

Source§

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

Source§

impl<'a, T> CredentialProvider for &'a mut T

Source§

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

Source§

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

Source§

impl<T> CredentialProvider for Box<T>

Source§

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

Source§

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

Source§

impl<T> CredentialProvider for Rc<T>

Source§

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

Source§

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

Source§

impl<T> CredentialProvider for Arc<T>

Source§

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

Source§

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

Implementors§