pub struct StatsResponse {
pub accounts: usize,
pub records: usize,
pub bytes: usize,
pub collections: BTreeMap<String, usize>,
pub blobs: BlobsView,
pub live_children: BTreeMap<String, usize>,
pub policy: PolicyView,
pub tree: TreeView,
}Expand description
Response of bot.did.stats.
One field per subject, and a subject with more than one figure to it
carries them in an object of its own rather than in a row of prefixed
keys: blobs is what this deployment’s blobs come to, and every question
about them is answered inside it.
Fields§
§accounts: usizeHow many accounts are provisioned.
records: usizeHow many records exist across every repository.
bytes: usizeThe stored size of those records as compact JSON.
collections: BTreeMap<String, usize>How many records each collection holds.
blobs: BlobsViewWhat this deployment’s blobs come to, by the state each blob is in.
Measured apart from bytes rather than folded into it: records are
measured as compact JSON and blobs as themselves, and one number over
two units would be a number nothing could act on. An operator
watching a run wants to know which of the two is growing.
live_children: BTreeMap<String, usize>How many live accounts hold a reference on a parent, by the child’s kind: what a principal cannot be deactivated or erased over. Absent while nothing hangs beneath anything.
policy: PolicyViewWhat operator policy this deployment enforces.
tree: TreeViewThe [tree] bounds this deployment is judging creates by right now.
Read live rather than at startup, so an operator who has edited
[tree] can see here whether the running server has picked the
edit up yet.
Implementations§
Source§impl StatsResponse
impl StatsResponse
Sourcepub fn from_stats(stats: &RegistryStats) -> Self
pub fn from_stats(stats: &RegistryStats) -> Self
Renders a registry snapshot for the wire.
Sourcepub fn with_policy(self, enforced: Option<&EnforcedSet>) -> Self
pub fn with_policy(self, enforced: Option<&EnforcedSet>) -> Self
Replaces StatsResponse::policy with the whole set enforced
describes, rather than its digest alone.
Separate from Self::from_stats because the digest comes off a
counted snapshot and the records come off the gate; a caller that
has both hands in both.
Trait Implementations§
Source§impl Clone for StatsResponse
impl Clone for StatsResponse
Source§fn clone(&self) -> StatsResponse
fn clone(&self) -> StatsResponse
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 StatsResponse
impl Debug for StatsResponse
Source§impl Default for StatsResponse
impl Default for StatsResponse
Source§fn default() -> StatsResponse
fn default() -> StatsResponse
Source§impl<'de> Deserialize<'de> for StatsResponse
impl<'de> Deserialize<'de> for StatsResponse
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 StatsResponse
impl PartialEq for StatsResponse
Source§fn eq(&self, other: &StatsResponse) -> bool
fn eq(&self, other: &StatsResponse) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for StatsResponse
impl Serialize for StatsResponse
impl Eq for StatsResponse
impl StructuralPartialEq for StatsResponse
Auto Trait Implementations§
impl Freeze for StatsResponse
impl RefUnwindSafe for StatsResponse
impl Send for StatsResponse
impl Sync for StatsResponse
impl Unpin for StatsResponse
impl UnsafeUnpin for StatsResponse
impl UnwindSafe for StatsResponse
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