pub struct TokenSourceEndpoint { /* private fields */ }Expand description
The return type of endpoint.
Implementations§
Source§impl TokenSourceEndpoint
impl TokenSourceEndpoint
Sourcepub fn with_header(
self,
key: impl Into<String>,
value: impl Into<String>,
) -> Self
pub fn with_header( self, key: impl Into<String>, value: impl Into<String>, ) -> Self
Adds a single header to the headers sent with every request, keeping any set previously.
Sourcepub fn with_headers(
self,
value: impl IntoIterator<Item = (impl Into<String>, impl Into<String>)>,
) -> Self
pub fn with_headers( self, value: impl IntoIterator<Item = (impl Into<String>, impl Into<String>)>, ) -> Self
Adds the given headers to the headers sent with every request, keeping any set previously. A key that was already set is overwritten with its new value.
Trait Implementations§
Source§impl TokenSourceConfigurable for TokenSourceEndpoint
impl TokenSourceConfigurable for TokenSourceEndpoint
fn fetch<'life0, 'life1, 'async_trait>(
&'life0 self,
options: &'life1 TokenSourceFetchOptions,
) -> Pin<Box<dyn Future<Output = TokenSourceResult<TokenSourceResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn cached(self) -> TokenSourceCached<Self>
fn cached(self) -> TokenSourceCached<Self>
Wraps this source in a caching layer that stores the last fetched
credentials and serves them for repeat fetches with equal options, for
as long as the token stays valid. See
TokenSourceCached.Auto Trait Implementations§
impl Freeze for TokenSourceEndpoint
impl RefUnwindSafe for TokenSourceEndpoint
impl Send for TokenSourceEndpoint
impl Sync for TokenSourceEndpoint
impl Unpin for TokenSourceEndpoint
impl UnsafeUnpin for TokenSourceEndpoint
impl UnwindSafe for TokenSourceEndpoint
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