pub struct StaticTokenCredential { /* private fields */ }Expand description
A TokenCredential that always returns the same, pre-fetched token.
Implementations§
Trait Implementations§
Source§impl Clone for StaticTokenCredential
impl Clone for StaticTokenCredential
Source§fn clone(&self) -> StaticTokenCredential
fn clone(&self) -> StaticTokenCredential
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 Debug for StaticTokenCredential
impl Debug for StaticTokenCredential
Source§impl TokenCredential for StaticTokenCredential
impl TokenCredential for StaticTokenCredential
Source§fn get_token<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_token<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Fetch a bearer token to send as
Authorization: Bearer <token>.Source§fn get_token_for_scope<'life0, 'life1, 'async_trait>(
&'life0 self,
_scope: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_token_for_scope<'life0, 'life1, 'async_trait>(
&'life0 self,
_scope: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Fetch a bearer token for a specific
scope (audience), e.g.
"https://ai.azure.com/.default". Read moreAuto Trait Implementations§
impl Freeze for StaticTokenCredential
impl RefUnwindSafe for StaticTokenCredential
impl Send for StaticTokenCredential
impl Sync for StaticTokenCredential
impl Unpin for StaticTokenCredential
impl UnsafeUnpin for StaticTokenCredential
impl UnwindSafe for StaticTokenCredential
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