pub struct FnProvider<F>(/* private fields */);Expand description
A CredentialProvider backed by a synchronous closure (see provider_fn).
Trait Implementations§
Source§impl<F> CredentialProvider for FnProvider<F>
impl<F> CredentialProvider for FnProvider<F>
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<F> Freeze for FnProvider<F>where
F: Freeze,
impl<F> RefUnwindSafe for FnProvider<F>where
F: RefUnwindSafe,
impl<F> Send for FnProvider<F>where
F: Send,
impl<F> Sync for FnProvider<F>where
F: Sync,
impl<F> Unpin for FnProvider<F>where
F: Unpin,
impl<F> UnsafeUnpin for FnProvider<F>where
F: UnsafeUnpin,
impl<F> UnwindSafe for FnProvider<F>where
F: UnwindSafe,
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