Struct aliri_tokens::BorrowedToken [−][src]
pub struct BorrowedToken<'a> { /* fields omitted */ }
Expand description
An outstanding borrow of a token
This borrow should be held for as brief a time as possible, as outstanding token borrows will block updates of a new token.
Methods from Deref<Target = TokenWithLifetime>
pub fn access_token(&self) -> &AccessTokenRef
[src]
pub fn access_token(&self) -> &AccessTokenRef
[src]Gets the current access token
pub fn id_token(&self) -> Option<&IdTokenRef>
[src]
pub fn id_token(&self) -> Option<&IdTokenRef>
[src]Gets the current ID token, if available
pub fn lifetime(&self) -> DurationSecs
[src]
pub fn lifetime(&self) -> DurationSecs
[src]Gets the token’s lifetime
pub fn fresh_interval(&self) -> Range<UnixTime>
[src]
pub fn fresh_interval(&self) -> Range<UnixTime>
[src]Gets the interval during which the token should be considered fresh
pub fn valid_interval(&self) -> Range<UnixTime>
[src]
pub fn valid_interval(&self) -> Range<UnixTime>
[src]Gets the interval during which the token is valid
pub fn token_status(&self) -> TokenStatus
[src]
pub fn token_status(&self) -> TokenStatus
[src]Gets the token’s current lifetime status
pub fn token_status_with_clock<C: Clock>(&self, clock: &C) -> TokenStatus
[src]
pub fn token_status_with_clock<C: Clock>(&self, clock: &C) -> TokenStatus
[src]Gets the token’s lifetime status based on the current time as reported by the provided clock
pub fn token_status_at(&self, time: UnixTime) -> TokenStatus
[src]
pub fn token_status_at(&self, time: UnixTime) -> TokenStatus
[src]Gets the token’s lifetime status as of the provided time
pub fn until_stale(&self) -> DurationSecs
[src]
pub fn until_stale(&self) -> DurationSecs
[src]Gets a duration for how much longer the token will be fresh
pub fn until_stale_with_clock<C: Clock>(&self, clock: &C) -> DurationSecs
[src]
pub fn until_stale_with_clock<C: Clock>(&self, clock: &C) -> DurationSecs
[src]Gets a duration for how much longer the token will be fresh based on the current time as reported by the provided clock
pub fn until_stale_at(&self, time: UnixTime) -> DurationSecs
[src]
pub fn until_stale_at(&self, time: UnixTime) -> DurationSecs
[src]Gets a duration for how much longer the token would be fresh as of the provided time
pub fn until_expired(&self) -> DurationSecs
[src]
pub fn until_expired(&self) -> DurationSecs
[src]Gets a duration for how much longer the token will be valid
pub fn until_expired_with_clock<C: Clock>(&self, clock: &C) -> DurationSecs
[src]
pub fn until_expired_with_clock<C: Clock>(&self, clock: &C) -> DurationSecs
[src]Gets a duration for how much longer the token will be valid based on the current time as reported by the provided clock
pub fn until_expired_at(&self, time: UnixTime) -> DurationSecs
[src]
pub fn until_expired_at(&self, time: UnixTime) -> DurationSecs
[src]Gets a duration for how much longer the token would be valid as of the provided time
Trait Implementations
impl<'a> Debug for BorrowedToken<'a>
[src]
impl<'a> Debug for BorrowedToken<'a>
[src]impl<'a> Deref for BorrowedToken<'a>
[src]
impl<'a> Deref for BorrowedToken<'a>
[src]type Target = TokenWithLifetime
type Target = TokenWithLifetime
The resulting type after dereferencing.
Auto Trait Implementations
impl<'a> RefUnwindSafe for BorrowedToken<'a>
impl<'a> !Send for BorrowedToken<'a>
impl<'a> Sync for BorrowedToken<'a>
impl<'a> Unpin for BorrowedToken<'a>
impl<'a> UnwindSafe for BorrowedToken<'a>
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,