pub enum TokenLeaseState<Lease> {
Granted {
lease: Lease,
expires_at: OffsetDateTime,
},
Pending {
retry_in: Duration,
},
NeedsRefresh,
}Expand description
Result of attempting to lease a token.
Variants§
Granted
A guard was produced. Dropping the guard should release the lease.
Fields
§
lease: LeaseUser-defined guard that owns the lease lifetime.
§
expires_at: OffsetDateTimeExpiry instant for the leased token record.
Pending
A lease will be available later; callers should retry after the delay.
NeedsRefresh
No usable token exists; flows should refresh or mint a new one.
Trait Implementations§
Auto Trait Implementations§
impl<Lease> Freeze for TokenLeaseState<Lease>where
Lease: Freeze,
impl<Lease> RefUnwindSafe for TokenLeaseState<Lease>where
Lease: RefUnwindSafe,
impl<Lease> Send for TokenLeaseState<Lease>where
Lease: Send,
impl<Lease> Sync for TokenLeaseState<Lease>where
Lease: Sync,
impl<Lease> Unpin for TokenLeaseState<Lease>where
Lease: Unpin,
impl<Lease> UnwindSafe for TokenLeaseState<Lease>where
Lease: UnwindSafe,
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