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) -> AccountSummary
pub fn new(provider: OAuthProviderId, account: &Account) -> AccountSummary
Row for one slot with every optional field unset.
Sourcepub fn with_account_id(self, account_id: Option<&str>) -> AccountSummary
pub fn with_account_id(self, account_id: Option<&str>) -> AccountSummary
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§fn clone(&self) -> AccountSummary
fn clone(&self) -> AccountSummary
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AccountSummary
impl Debug for AccountSummary
Source§impl Default for AccountSummary
impl Default for AccountSummary
Source§fn default() -> AccountSummary
fn default() -> AccountSummary
Source§impl<'de> Deserialize<'de> for AccountSummary
impl<'de> Deserialize<'de> for AccountSummary
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<AccountSummary, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<AccountSummary, <__D as Deserializer<'de>>::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
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
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<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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