pub struct StaticToken { /* private fields */ }Expand description
A fixed, already-minted bearer token.
For CI that injects a token from elsewhere, or tests that want a known
string. Reports a generous default lifetime so the client doesn’t try
to re-mint it; override with StaticToken::with_lifetime_secs.
Implementations§
Source§impl StaticToken
impl StaticToken
Trait Implementations§
Source§impl Clone for StaticToken
impl Clone for StaticToken
Source§impl Debug for StaticToken
impl Debug for StaticToken
Source§impl TokenSource for StaticToken
impl TokenSource for StaticToken
Source§fn mint(&self) -> Result<MintedToken>
fn mint(&self) -> Result<MintedToken>
Mint a fresh token. The client calls this lazily and caches the
result until shortly before it expires, so this need not be cheap.
Auto Trait Implementations§
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