pub struct StaticToken { /* private fields */ }Expand description
A static API key. Used when no OAuth refresh is needed.
Implementations§
Trait Implementations§
Source§impl Clone for StaticToken
impl Clone for StaticToken
Source§impl Debug for StaticToken
impl Debug for StaticToken
Source§impl From<StaticToken> for AnyTokenProvider
Available on crate feature net only.
impl From<StaticToken> for AnyTokenProvider
Available on crate feature
net only.Source§fn from(t: StaticToken) -> Self
fn from(t: StaticToken) -> Self
Converts to this type from the input type.
Source§impl TokenProvider for StaticToken
impl TokenProvider for StaticToken
Source§async fn get_token(&self) -> Result<String, AuthError>
async fn get_token(&self) -> Result<String, AuthError>
Return a valid access token, refreshing if necessary.
Source§fn mark_stale(&self)
fn mark_stale(&self)
Drop the cached token so the next
TokenProvider::get_token refreshes.Source§fn wake(&self)
fn wake(&self)
Host laptop-wake hook. Default calls
TokenProvider::mark_stale.Auto Trait Implementations§
impl Forget for StaticToken
impl Freeze for StaticToken
impl RefUnwindSafe for StaticToken
impl Send for StaticToken
impl Sync for StaticToken
impl Unpin for StaticToken
impl UnsafeUnpin for StaticToken
impl UnwindSafe for StaticToken
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