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 duplicate 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 = 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 Debug for GlobalCredentialProvider
impl Debug for GlobalCredentialProvider
Source§impl PartialEq for GlobalCredentialProvider
impl PartialEq for GlobalCredentialProvider
impl Copy for GlobalCredentialProvider
impl Eq for GlobalCredentialProvider
impl StructuralPartialEq for GlobalCredentialProvider
Auto Trait Implementations§
impl Freeze for GlobalCredentialProvider
impl RefUnwindSafe for GlobalCredentialProvider
impl Send for GlobalCredentialProvider
impl Sync for GlobalCredentialProvider
impl Unpin for GlobalCredentialProvider
impl UnwindSafe for GlobalCredentialProvider
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more