pub enum AccountKind {
Free,
Subscription,
ApiKey,
InApp,
Provider,
}Expand description
What a profile signs in with.
Variants§
Free
Nothing: the harness runs on models its makers offer for free, without an account. There is no login to make, store or carry.
Subscription
A plan the user logs in to in a browser.
ApiKey
A key the user pastes in.
InApp
A login the person makes inside the harness’s own window, once, in the profile wizard:
QCode opens the window in a sign-in container, the person signs in there through their own
browser, and QCode takes the login out into the profile’s credentials volume, from where
every workspace’s home is given it before its window opens. Written in-app in definition
files, as it always was, so a profile made before QCode stored this login loads as one that
is not signed in yet.
Provider
A provider the person added on the Providers page, named in the profile by its tag and a
model of its own. Nothing for QCode’s sign-in container to make either: the key already
lives in providers.toml, and a tab of this profile is pointed at the workspace’s relay
instead of the provider’s own address, so the key never enters the container.
Implementations§
Source§impl AccountKind
impl AccountKind
Sourcepub const ALL: [Self; 5]
pub const ALL: [Self; 5]
Every account type. The wizard offers each harness’s own list, in that harness’s order.
Sourcepub fn needs_login(self) -> bool
pub fn needs_login(self) -> bool
Whether QCode has a login to make for a profile with this account. One that has none is ready as soon as its image is, and nothing about it waits for a credentials volume.
An in-app login is made in the harness’s own window, but once and in the wizard, so that no workspace has to ask for it again: it is a login QCode makes and stores like a subscription’s.
A provider is the same: its key already lives in providers.toml, added on the Providers
page long before this profile existed, so there is nothing for a sign-in container to
capture either.
Trait Implementations§
Source§impl Clone for AccountKind
impl Clone for AccountKind
impl Copy for AccountKind
Source§impl Debug for AccountKind
impl Debug for AccountKind
impl Eq for AccountKind
Source§impl PartialEq for AccountKind
impl PartialEq for AccountKind
impl StructuralPartialEq for AccountKind
Auto Trait Implementations§
impl Freeze for AccountKind
impl RefUnwindSafe for AccountKind
impl Send for AccountKind
impl Sync for AccountKind
impl Unpin for AccountKind
impl UnsafeUnpin for AccountKind
impl UnwindSafe for AccountKind
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,
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>
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>
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)
&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)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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
key and return true if they are equal.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