pub enum AuthSessionStatus {
Pending,
UrlAvailable {
auth_url: String,
},
CodeEmitted {
device_code: String,
verification_url: String,
},
Success {
bundle_id: String,
email: Option<String>,
account_id: Option<String>,
},
Failed {
error: String,
},
}Variants§
Pending
CLI is spawned, we’re waiting for it to emit either a URL, a device code, or a success line.
UrlAvailable
CLI emitted an OAuth URL. Frontend surfaces this to the user for paste-into-browser if auto-open failed.
CodeEmitted
CLI emitted a device code. Frontend renders it prominently.
Success
CLI authenticated successfully. The handler captured the credentials and created the bundle.
Fields
email: Option<String>Best-effort — extracted from the CLI’s “logged in as…” line. Used by the frontend to name the bundle.
account_id: Option<String>Set only for a direct-account session (issue #1624 PR-C
Part B) — the newly-minted or reused IdentityAccount id,
with no bundle involved. bundle_id is an empty string in
that mode; existing bundle-mode callers never populate
this field, so it’s skipped on the wire when absent.
Failed
Auth attempt failed. error is a short human-readable phrase
suitable to render inline.
Implementations§
Source§impl AuthSessionStatus
impl AuthSessionStatus
pub fn is_terminal(&self) -> bool
Trait Implementations§
Source§impl Clone for AuthSessionStatus
impl Clone for AuthSessionStatus
Source§fn clone(&self) -> AuthSessionStatus
fn clone(&self) -> AuthSessionStatus
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AuthSessionStatus
impl Debug for AuthSessionStatus
Source§impl<'de> Deserialize<'de> for AuthSessionStatus
impl<'de> Deserialize<'de> for AuthSessionStatus
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for AuthSessionStatus
impl PartialEq for AuthSessionStatus
Source§impl Serialize for AuthSessionStatus
impl Serialize for AuthSessionStatus
impl StructuralPartialEq for AuthSessionStatus
Source§impl TS for AuthSessionStatus
impl TS for AuthSessionStatus
Source§type WithoutGenerics = AuthSessionStatus
type WithoutGenerics = AuthSessionStatus
WithoutGenerics should just be Self.
If the type does have generic parameters, then all generic parameters must be replaced with
a dummy type, e.g ts_rs::Dummy or (). The only requirement for these dummy types is that
EXPORT_TO must be None. Read moreSource§type OptionInnerType = AuthSessionStatus
type OptionInnerType = AuthSessionStatus
std::option::Option<T>, then this associated type is set to T.
All other implementations of TS should set this type to Self instead.Source§fn decl_concrete(cfg: &Config) -> String
fn decl_concrete(cfg: &Config) -> String
TS::decl().
If this type is not generic, then this function is equivalent to TS::decl().Source§fn decl(cfg: &Config) -> String
fn decl(cfg: &Config) -> String
type User = { user_id: number, ... }.
This function will panic if the type has no declaration. Read moreSource§fn inline(cfg: &Config) -> String
fn inline(cfg: &Config) -> String
{ user_id: number }.
This function will panic if the type cannot be inlined.Source§fn inline_flattened(cfg: &Config) -> String
fn inline_flattened(cfg: &Config) -> String
Source§fn visit_generics(v: &mut impl TypeVisitor)where
Self: 'static,
fn visit_generics(v: &mut impl TypeVisitor)where
Self: 'static,
Source§fn output_path() -> Option<PathBuf>
fn output_path() -> Option<PathBuf>
T should be exported, relative to the output directory.
The returned path does not include any base directory. Read moreSource§fn visit_dependencies(v: &mut impl TypeVisitor)where
Self: 'static,
fn visit_dependencies(v: &mut impl TypeVisitor)where
Self: 'static,
§fn docs() -> Option<String>
fn docs() -> Option<String>
TS is derived, docs are
automatically read from your doc comments or #[doc = ".."] attributes§fn dependencies(cfg: &Config) -> Vec<Dependency>where
Self: 'static,
fn dependencies(cfg: &Config) -> Vec<Dependency>where
Self: 'static,
§fn export(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
fn export(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
TS::export_all]. Read more§fn export_all(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
fn export_all(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
TS::export]. Read moreAuto Trait Implementations§
impl Freeze for AuthSessionStatus
impl RefUnwindSafe for AuthSessionStatus
impl Send for AuthSessionStatus
impl Sync for AuthSessionStatus
impl Unpin for AuthSessionStatus
impl UnsafeUnpin for AuthSessionStatus
impl UnwindSafe for AuthSessionStatus
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> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§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