pub enum DevicePollOutcome {
Pending,
SlowDown,
Authorized(McpOAuthTokens),
Denied,
Expired,
}Expand description
One poll of the token endpoint for a device code — RFC 8628 §3.5. The
server replies authorization_pending until the user finishes at
verification_uri; the caller (e.g. poll_until_authorized) is
expected to sleep interval_secs and retry.
Variants§
Pending
The user hasn’t completed authorization yet — keep polling at the same interval.
SlowDown
The user hasn’t completed authorization yet AND the server wants
polling slowed down (RFC 8628 §3.5) — the next poll should wait
interval + 5s, not just interval.
Authorized(McpOAuthTokens)
The user completed authorization; tokens are attached.
Denied
The user (or the server) denied/cancelled — stop polling.
Expired
The device code expired before authorization completed.
Trait Implementations§
Source§impl Clone for DevicePollOutcome
impl Clone for DevicePollOutcome
Source§fn clone(&self) -> DevicePollOutcome
fn clone(&self) -> DevicePollOutcome
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 DevicePollOutcome
impl Debug for DevicePollOutcome
impl Eq for DevicePollOutcome
Source§impl PartialEq for DevicePollOutcome
impl PartialEq for DevicePollOutcome
impl StructuralPartialEq for DevicePollOutcome
Auto Trait Implementations§
impl Freeze for DevicePollOutcome
impl RefUnwindSafe for DevicePollOutcome
impl Send for DevicePollOutcome
impl Sync for DevicePollOutcome
impl Unpin for DevicePollOutcome
impl UnsafeUnpin for DevicePollOutcome
impl UnwindSafe for DevicePollOutcome
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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§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.