Module dittolive_ditto::small_peer_info
source · Expand description
Use ditto.small_peer_info()
to interact with peer metadata.
§Example
use dittolive_ditto::prelude::*;
let small_peer_info = ditto.small_peer_info();
small_peer_info.set_metadata(&serde_json::json!({
"deviceType": "cashRegister"
}))?;
let metadata: serde_json::Value = small_peer_info.metadata()?;
assert_eq!(metadata["deviceType"].as_str().unwrap(), "cashRegister");
Structs§
- 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.
Enums§
- Determines which “kind” of peers the small peer info will be replicate to, defaults to
DittoSmallPeerInfoSyncScope::BigPeerOnly
. Which peers to replicate the__small_peer_info
collection to.