pub struct GlobalCredentialProvider;
Expand description
全局认证信息提供者,可以将认证信息配置在全局变量中。任何全局认证信息提供者实例都可以设置和访问全局认证信息。
Implementations§
source§impl GlobalCredentialProvider
impl GlobalCredentialProvider
sourcepub fn setup(credential: Credential)
pub fn setup(credential: Credential)
配置全局认证信息
Trait Implementations§
source§impl Clone for GlobalCredentialProvider
impl Clone for GlobalCredentialProvider
source§fn clone(&self) -> GlobalCredentialProvider
fn clone(&self) -> GlobalCredentialProvider
Returns a copy 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 moresource§impl CredentialProvider for GlobalCredentialProvider
impl CredentialProvider for GlobalCredentialProvider
source§fn get(&self, _opts: GetOptions) -> IoResult<GotCredential>
fn get(&self, _opts: GetOptions) -> IoResult<GotCredential>
返回七牛认证信息 Read more
source§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.异步返回七牛认证信息
source§impl Debug for GlobalCredentialProvider
impl Debug for GlobalCredentialProvider
source§impl PartialEq<GlobalCredentialProvider> for GlobalCredentialProvider
impl PartialEq<GlobalCredentialProvider> for GlobalCredentialProvider
source§fn eq(&self, other: &GlobalCredentialProvider) -> bool
fn eq(&self, other: &GlobalCredentialProvider) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.