pub struct AccountSummary {
pub did: String,
pub account_id: String,
pub handle: Option<String>,
pub kind: AccountKind,
pub created_at: String,
pub state: AccountState,
pub locks: Locks,
pub holds: Holds,
pub parent: Option<String>,
pub operator: String,
pub proof: AccountProof,
pub edge: EdgeState,
}Expand description
One entry in the listAccounts response.
This server’s account of its own contents, which is the most a listing
can ever be. A reader deriving “which agents does this operator have” from
it gets a lower bound: a server can omit an entry, and nothing in the
operator’s repository would contradict it, because an operator writes one
bot.did.operator record per server and never one per agent. What a
server cannot do is inflate the count — a DID it invents has no record
behind it in the operator’s repository — so a reader that verifies each
entry rather than trusting the list is safe in one direction and short
in the other. See docs/operator-verification.md.
Fields§
§did: StringThe account’s DID.
account_id: StringThe agent the account was minted for.
handle: Option<String>The handle the account answers to, when it has one.
The name is the interesting half of an account for anyone reading a
listing: basalt-otter.agents.example is a thing a person can hold in
their head and a3f9c1.agents.example is not. It is reported as the
server stored it, zone and all, so that a reader can check it lands
under the zone the server admits to minting rather than trusting the
label alone.
Absent only for an account provisioned before this deployment issued handles. An account whose handle is its own hostname reports that hostname: it is what the account actually answers to, and saying nothing would be a different claim.
kind: AccountKindWhat kind of account it is.
created_at: StringWhen the account was provisioned, RFC 3339.
state: AccountStateWhether the data exists; see AccountState.
locks: LocksEvery lock hung on the account, each with the party that hung it.
The one surface that can say an account is frozen at all: #account
cannot, because the lexicon has no wire concept of “active but not
writable”. See docs/conformance.md.
holds: HoldsEvery hold set on the account.
parent: Option<String>The hosted account that created this one; absent for a root, whose
operator is the deployment’s. See didbot_pds::HostedAccount::parent.
operator: StringThe human who answers for this account: the same DID its
registration names, at any depth. Self::parent is the next hop
of the walk in docs/ownership.md.
proof: AccountProofWhat a stranger can authenticate as this account with.
edge: EdgeStateWhether the edge above this account still stands. See EdgeState.
Implementations§
Source§impl AccountSummary
impl AccountSummary
Sourcepub fn from_account(
account: &HostedAccount,
operator: &str,
credentials: &[Credential],
) -> Self
pub fn from_account( account: &HostedAccount, operator: &str, credentials: &[Credential], ) -> Self
Summarizes a stored account, with operator as the DID this
deployment’s operator holds.
A timestamp that will not format is reported as an empty string rather
than failing the whole listing. Rfc3339 only rejects years outside
0000..=9999, which no clock this reads will produce.
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<'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>,
Source§impl PartialEq for AccountSummary
impl PartialEq for AccountSummary
Source§fn eq(&self, other: &AccountSummary) -> bool
fn eq(&self, other: &AccountSummary) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for AccountSummary
impl Serialize for AccountSummary
impl Eq 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§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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