pub struct Account {
pub email: String,
pub tenant_id: String,
pub home_account_id: String,
pub added_at: DateTime<Utc>,
pub storage: TokenStorage,
}Expand description
A signed-in Microsoft account.
This is metadata only — no tokens. Tokens live in the OS keychain
or in a per-account file at ~/.config/pidge/tokens/<email>.json,
keyed by email. The storage field tells pidge which backend to look in.
Fields§
§email: String§tenant_id: String§home_account_id: String§added_at: DateTime<Utc>§storage: TokenStorageImplementations§
Source§impl Account
impl Account
Sourcepub const PERSONAL_MSA_TENANT: &'static str = "9188040d-6c67-4c5b-b112-36a304b66dad"
pub const PERSONAL_MSA_TENANT: &'static str = "9188040d-6c67-4c5b-b112-36a304b66dad"
Well-known tenant ID for personal Microsoft accounts (outlook.com, live.com, hotmail.com). Microsoft documents this as the “MSA” tenant.
Sourcepub fn is_personal(&self) -> bool
pub fn is_personal(&self) -> bool
True if this account is a personal Microsoft account.
Sourcepub fn tenant_label(&self) -> String
pub fn tenant_label(&self) -> String
A short human label for the tenant — “personal MSA” for MSA, GUID prefix otherwise.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Account
impl<'de> Deserialize<'de> for Account
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Account
impl StructuralPartialEq for Account
Auto Trait Implementations§
impl Freeze for Account
impl RefUnwindSafe for Account
impl Send for Account
impl Sync for Account
impl Unpin for Account
impl UnsafeUnpin for Account
impl UnwindSafe for Account
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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
Compare self to
key and return true if they are equal.