pub enum PollOutcome {
Pending,
SlowDown {
interval: Duration,
},
Approved(UserAccessToken),
}Expand description
The result of one poll.
The two recoverable states of the error matrix live here rather than in
DeviceFlowError, which is what stops a caller from treating “the user has
not clicked approve yet” as a failure.
Variants§
Pending
authorization_pending — keep polling at the current interval.
SlowDown
slow_down — keep polling, at this longer interval from now on.
Approved(UserAccessToken)
The user approved. This is the only value in the crate that carries a live credential out of the device flow.
Trait Implementations§
Source§impl Clone for PollOutcome
impl Clone for PollOutcome
Source§fn clone(&self) -> PollOutcome
fn clone(&self) -> PollOutcome
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PollOutcome
impl Debug for PollOutcome
impl Eq for PollOutcome
Source§impl PartialEq for PollOutcome
impl PartialEq for PollOutcome
impl StructuralPartialEq for PollOutcome
Auto Trait Implementations§
impl Freeze for PollOutcome
impl RefUnwindSafe for PollOutcome
impl Send for PollOutcome
impl Sync for PollOutcome
impl Unpin for PollOutcome
impl UnsafeUnpin for PollOutcome
impl UnwindSafe for PollOutcome
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.