pub struct GlobalCredentialProvider;
Expand description
全局认证信息提供者,可以将认证信息配置在全局变量中。任何全局认证信息提供者实例都可以设置和访问全局认证信息。
Implementations
sourceimpl GlobalCredentialProvider
impl GlobalCredentialProvider
sourcepub fn setup(credential: Credential)
pub fn setup(credential: Credential)
配置全局认证信息
Trait Implementations
sourceimpl Clone for GlobalCredentialProvider
impl Clone for GlobalCredentialProvider
sourcefn clone(&self) -> GlobalCredentialProvider
fn clone(&self) -> GlobalCredentialProvider
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl CredentialProvider for GlobalCredentialProvider
impl CredentialProvider for GlobalCredentialProvider
sourcefn get(&self, _opts: GetOptions) -> IoResult<GotCredential>
fn get(&self, _opts: GetOptions) -> IoResult<GotCredential>
返回七牛认证信息 Read more
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 Debug for GlobalCredentialProvider
impl Debug for GlobalCredentialProvider
impl Copy for GlobalCredentialProvider
impl Eq for GlobalCredentialProvider
impl StructuralEq for GlobalCredentialProvider
impl StructuralPartialEq for GlobalCredentialProvider
Auto Trait Implementations
impl RefUnwindSafe for GlobalCredentialProvider
impl Send for GlobalCredentialProvider
impl Sync for GlobalCredentialProvider
impl Unpin for GlobalCredentialProvider
impl UnwindSafe for GlobalCredentialProvider
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more