pub struct SmallPeerInfo { /* private fields */ }
Expand description

The entrypoint for small peer user info collection. Small peer info consists of information gathered into a system collection on a regular interval and optionally synced to the Big Peer for device dashboard and debugging purposes.

You don’t create this class directly, but can access it from a particular Ditto instance via its Ditto::small_peer_info method.

Implementations

Indicates whether small peer info collection is currently enabled, defaults to false.

Small peer info consists of information scraped into a system collection at repeated intervals and synced to the Big Peer for device dashboard and debugging purposes.

Note: whether the background ingestion process is enabled or not is a separate decision to whether this information is allowed to sync to other peers (including the big peer). This is controlled by DittoSmallPeerInfoSyncScope.

Sets whether small peer info collection is currently enabled.

Determines which “kind” of peers the small peer info will be replicate to, defaults to DittoSmallPeerInfoSyncScope::LocalPeerOnly.

Sets which “kind” of peers the small peer info will be replicated to.

Returns the JSON metadata being associated with the small peer info.

Sets the JSON metadata to be associated with the small peer info.

The metadata is a free-form, user-provided dictionary that is serialized into JSON and is inserted into the small peer info system doc at each collection interval. The dictionary has no schema except for the following constraints:

  1. All contained values must be JSON serializable.
  2. The size of the dictionary serialized as JSON may not exceed 128 KB.
  3. The dictionary may only be nested up to 2 levels deep.

Returns the JSON string of the metadata being associated with the small peer info.

Sets the JSON metadata to be associated with the small peer info.

The metadata is free-form, user-provided string is serialized into JSON and is inserted into the small peer info system doc at each collection interval. The dictionary has no schema except for the following constraints:

  1. All contained values must be JSON serializable.
  2. The size of the dictionary serialized as JSON may not exceed 128 KB.
  3. The dictionary may only be nested up to 2 levels deep.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Applies the [Compat] adapter by value. Read more
Applies the [Compat] adapter by shared reference. Read more
Applies the [Compat] adapter by mutable reference. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Converts to T by calling Into<T>::into.
Tries to convert to T by calling TryInto<T>::try_into.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.