pub enum DeviceFlowStep {
Pending,
SlowDown,
Done {
access_token: String,
refresh_token: Option<String>,
expires_in: Option<u64>,
},
}Variants§
Pending
User hasn’t authorised yet; caller should sleep interval and
poll again.
SlowDown
Provider asked us to back off; caller should sleep
interval (which was just increased) before the next poll.
Done
Final state — access token in hand. Carries the refresh token
- expiry hint so
auth::set_token_with_refreshcan persist them andauth::refresh_if_neededcan renew without prompting the user again.Nonewhen the provider didn’t issue one (GitHub OAuth Apps).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DeviceFlowStep
impl RefUnwindSafe for DeviceFlowStep
impl Send for DeviceFlowStep
impl Sync for DeviceFlowStep
impl Unpin for DeviceFlowStep
impl UnsafeUnpin for DeviceFlowStep
impl UnwindSafe for DeviceFlowStep
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