pub struct GitHubAccounts {
pub logins: Vec<String>,
pub active: Option<String>,
pub signed_in: Vec<SignedInAccount>,
}Expand description
The github.com accounts: logins holds each login once, compared without
case, with the signed-in accounts first in GitHub’s spelling. active is
gh’s active account.
Fields§
§logins: Vec<String>§active: Option<String>§signed_in: Vec<SignedInAccount>Implementations§
Source§impl GitHubAccounts
impl GitHubAccounts
Sourcepub fn pick(&self, saved: Option<&str>) -> Option<String>
pub fn pick(&self, saved: Option<&str>) -> Option<String>
The saved account when it is still known, else gh’s active account, else the first one, in the list’s spelling.
Sourcepub fn source(&self, login: &str) -> AccountSource
pub fn source(&self, login: &str) -> AccountSource
Where login’s token comes from. A signed-in account comes first,
as its token does.
Trait Implementations§
Source§impl Clone for GitHubAccounts
impl Clone for GitHubAccounts
Source§impl Debug for GitHubAccounts
impl Debug for GitHubAccounts
Source§impl Default for GitHubAccounts
impl Default for GitHubAccounts
impl Eq for GitHubAccounts
Source§impl PartialEq for GitHubAccounts
impl PartialEq for GitHubAccounts
impl StructuralPartialEq for GitHubAccounts
Auto Trait Implementations§
impl Forget for GitHubAccounts
impl Freeze for GitHubAccountswhere
*const u8 is !null: Freeze,
PhantomData<String>: Freeze,
PhantomData<u8>: Freeze,
PhantomData<SignedInAccount>: Freeze,
impl Move for GitHubAccounts
impl RefUnwindSafe for GitHubAccounts
impl Send for GitHubAccountswhere
RawVecInner: Send,
impl Sync for GitHubAccountswhere
RawVecInner: Sync,
impl Unpin for GitHubAccounts
impl UnsafeUnpin for GitHubAccountswhere
*const u8 is !null: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<SignedInAccount>: UnsafeUnpin,
impl UnwindSafe for GitHubAccountswhere
RawVecInner: UnwindSafe,
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