pub struct CopilotAccount {
pub label: String,
pub user: String,
}Expand description
One named Copilot account, resolved through the GitHub CLI’s own multi-account support rather than by storing a token here.
[[copilot.accounts]]
label = "work"
user = "my-work-login"Sign the second account in with gh auth login (gh keeps both on the same
host); gh auth status lists the login names. user is that login name,
not an email, and is validated against GitHub’s login grammar before it
reaches the command line.
There is deliberately no hostname field yet. gh supports GitHub
Enterprise hosts, but the quota endpoint
(https://api.github.com/copilot_internal/user) is github.com-only, so
accepting a hostname would promise GHES support the fetch cannot keep.
Fields§
§label: StringStable name used on the CLI (--account <label>) and as the cache
subdir (~/.cache/ai-usagebar/copilot/<label>).
user: StringThe GitHub login this account signs in as, passed to
gh auth token --user <user>.
Trait Implementations§
Source§impl Clone for CopilotAccount
impl Clone for CopilotAccount
Source§impl Debug for CopilotAccount
impl Debug for CopilotAccount
Source§impl<'de> Deserialize<'de> for CopilotAccount
impl<'de> Deserialize<'de> for CopilotAccount
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>,
impl Eq for CopilotAccount
Source§impl PartialEq for CopilotAccount
impl PartialEq for CopilotAccount
Source§impl Serialize for CopilotAccount
impl Serialize for CopilotAccount
impl StructuralPartialEq for CopilotAccount
Auto Trait Implementations§
impl Freeze for CopilotAccount
impl RefUnwindSafe for CopilotAccount
impl Send for CopilotAccount
impl Sync for CopilotAccount
impl Unpin for CopilotAccount
impl UnsafeUnpin for CopilotAccount
impl UnwindSafe for CopilotAccount
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>,
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> 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