pub enum OAuthStatus {
Pending,
UrlAvailable {
auth_url: String,
},
CodeEmitted {
user_code: String,
verification_uri: String,
},
Success {
account_id: String,
granted_scopes: Vec<String>,
missing_scopes: Vec<String>,
email: Option<String>,
},
Failed {
error: String,
},
Picked {
account_id: String,
file_ids: Vec<String>,
},
ConfirmUser {
current_login: String,
current_id: u64,
new_login: String,
new_id: u64,
},
}Expand description
Terminal/transient status surfaced to the frontend poll.
Variants§
Pending
Seeded the instant a session is created, before the spawned task has emitted its first real status. Non-terminal so an early poll doesn’t see a terminal value and abort the flow.
UrlAvailable
Code flow: browser opened to auth_url; awaiting the loopback callback.
CodeEmitted
Device flow: show user_code + verification_uri; polling in progress.
Success
Done — the account row + keychain token are persisted. granted_scopes
is what the provider granted; missing_scopes what was asked for and
unticked on the consent screen (a partial grant).
Fields
Failed
Picked
Google’s file picker finished: the Drive files the person picked for this account’s client (spec §3.3). The account’s tokens are untouched.
ConfirmUser
A brokered connect for another GitHub user than the account is connected as:
the flow stopped, and the frontend asks, then starts again with replace_user.
Implementations§
Source§impl OAuthStatus
impl OAuthStatus
pub fn is_terminal(&self) -> bool
Trait Implementations§
Source§impl Clone for OAuthStatus
impl Clone for OAuthStatus
Source§fn clone(&self) -> OAuthStatus
fn clone(&self) -> OAuthStatus
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for OAuthStatus
impl RefUnwindSafe for OAuthStatus
impl Send for OAuthStatus
impl Sync for OAuthStatus
impl Unpin for OAuthStatus
impl UnsafeUnpin for OAuthStatus
impl UnwindSafe for OAuthStatus
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more