pub struct OAuthActivation {
pub credentials: OwnedOAuthCredentials,
pub config_path: PathBuf,
pub auth_path: PathBuf,
pub provider: OAuthProvider,
pub account_label: Option<String>,
pub replaced: Option<Option<String>>,
}Expand description
Receipt for a committed Codewhale-owned OAuth generation.
Fields§
§credentials: OwnedOAuthCredentials§config_path: PathBuf§auth_path: PathBuf§provider: OAuthProvider§account_label: Option<String>Non-secret label (email, plan) of the account just signed in.
replaced: Option<Option<String>>Some when this login replaced an existing Codewhale-owned sign-in;
the inner value is that account’s label when it had one.
Implementations§
Source§impl OAuthActivation
impl OAuthActivation
Sourcepub fn summary(&self, locale: Locale) -> String
pub fn summary(&self, locale: Locale) -> String
“Signed in to ChatGPT as you@example.com (plus).” plus, on its own
line, which sign-in this login replaced. Never token material. Shell
commands pass Locale::En; the
TUI passes its UI locale.
Sourcepub fn env_override_warning(&self, _locale: Locale) -> Option<String>
pub fn env_override_warning(&self, _locale: Locale) -> Option<String>
Official ChatGPT sign-in never uses an ambient process token.
Trait Implementations§
Auto Trait Implementations§
impl Forget for OAuthActivation
impl Freeze for OAuthActivation
impl Move for OAuthActivation
impl RefUnwindSafe for OAuthActivation
impl Send for OAuthActivation
impl Sync for OAuthActivation
impl Unpin for OAuthActivation
impl UnsafeUnpin for OAuthActivation
impl UnwindSafe for OAuthActivation
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
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.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.