pub struct AccountSummary {
pub provider: String,
pub label: String,
pub identity: Option<String>,
pub account_id_prefix: Option<String>,
pub seat_fingerprint: Option<String>,
pub expires: u64,
pub added_at: Option<u64>,
pub selected: bool,
pub cooldown_until: Option<u64>,
}Expand description
Non-secret listing row for one stored account. Never carries token
material; account_id_prefix is at most 8 characters.
Construct with AccountSummary::new and set the optional fields you
know; new optional fields are added with serde defaults so older brokers
and clients keep interoperating.
Fields§
§provider: String§label: String§identity: Option<String>§account_id_prefix: Option<String>§seat_fingerprint: Option<String>Stable, opaque fingerprint of the provider seat this slot holds
(seat_fingerprint over the FULL provider account id). Two aliases
of one seat share it; a re-login with another seat changes it. None
when the provider exposes no account id — consumers that must act on
exactly one seat (activation, spending) fail closed on None.
expires: u64Access-token expiry (epoch ms); 0 when unknown.
added_at: Option<u64>§selected: boolTrue when the active policy would select this account.
cooldown_until: Option<u64>Broker-side cooldown (epoch ms) after a reported provider limit.
Implementations§
Source§impl AccountSummary
impl AccountSummary
Sourcepub fn new(provider: OAuthProviderId, account: &Account) -> Self
pub fn new(provider: OAuthProviderId, account: &Account) -> Self
Row for one slot with every optional field unset.
Sourcepub fn with_account_id(self, account_id: Option<&str>) -> Self
pub fn with_account_id(self, account_id: Option<&str>) -> Self
Set both identity views derived from the provider’s account id: the short display prefix and the full-id fingerprint.
pub fn credential_ref(&self) -> Option<CredentialRef>
Trait Implementations§
Source§impl Clone for AccountSummary
impl Clone for AccountSummary
Source§impl Debug for AccountSummary
impl Debug for AccountSummary
Source§impl Default for AccountSummary
impl Default for AccountSummary
Source§impl<'de> Deserialize<'de> for AccountSummary
impl<'de> Deserialize<'de> for AccountSummary
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 AccountSummary
Source§impl PartialEq for AccountSummary
impl PartialEq for AccountSummary
Source§impl Serialize for AccountSummary
impl Serialize for AccountSummary
impl StructuralPartialEq for AccountSummary
Auto Trait Implementations§
impl Freeze for AccountSummary
impl RefUnwindSafe for AccountSummary
impl Send for AccountSummary
impl Sync for AccountSummary
impl Unpin for AccountSummary
impl UnsafeUnpin for AccountSummary
impl UnwindSafe for AccountSummary
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§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.