pub struct StaticCredential(/* private fields */);Expand description
A provider that always yields the same Credential for every request — the
common “use this one token” case.
Implementations§
Trait Implementations§
Source§impl Clone for StaticCredential
impl Clone for StaticCredential
Source§fn clone(&self) -> StaticCredential
fn clone(&self) -> StaticCredential
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 StaticCredential
impl CredentialProvider for StaticCredential
Source§fn credential<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_request: &'life1 CredentialRequest<'life2>,
) -> Pin<Box<dyn Future<Output = Result<Option<Credential>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn credential<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_request: &'life1 CredentialRequest<'life2>,
) -> Pin<Box<dyn Future<Output = Result<Option<Credential>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Resolve the credential for
request, or Ok(None) to defer to ambient
auth. An Err aborts the operation (e.g. the vault was unreachable). Read moreAuto Trait Implementations§
impl Freeze for StaticCredential
impl RefUnwindSafe for StaticCredential
impl Send for StaticCredential
impl Sync for StaticCredential
impl Unpin for StaticCredential
impl UnsafeUnpin for StaticCredential
impl UnwindSafe for StaticCredential
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