pub struct SignedInAccounts { /* private fields */ }Expand description
The signed-in accounts and their tokens.
Implementations§
Source§impl SignedInAccounts
impl SignedInAccounts
pub fn accounts(&self) -> Vec<SignedInAccount>
Sourcepub fn find(&self, login: &str) -> Option<SignedInAccount>
pub fn find(&self, login: &str) -> Option<SignedInAccount>
The signed-in account login, whatever its case.
Sourcepub fn token(&self, login: &str) -> Result<Option<Secret>, StoreError>
pub fn token(&self, login: &str) -> Result<Option<Secret>, StoreError>
The token of login while GitHub still accepts it.
Sourcepub fn save(&self, login: &str, token: &Secret) -> Result<(), StoreError>
pub fn save(&self, login: &str, token: &Secret) -> Result<(), StoreError>
Keeps token for login, replacing an earlier sign-in.
Sourcepub fn remove(&self, login: &str) -> Result<Option<Secret>, StoreError>
pub fn remove(&self, login: &str) -> Result<Option<Secret>, StoreError>
Forgets login and gives back its token, so it can be revoked.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for SignedInAccounts
impl !RefUnwindSafe for SignedInAccounts
impl !UnwindSafe for SignedInAccounts
impl Forget for SignedInAccounts
impl Move for SignedInAccounts
impl Send for SignedInAccounts
impl Sync for SignedInAccounts
impl Unpin for SignedInAccounts
impl UnsafeUnpin for SignedInAccounts
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