pub struct IotWirelessData {
pub resources: BTreeMap<String, BTreeMap<String, Value>>,
pub tags: BTreeMap<String, BTreeMap<String, String>>,
pub singletons: BTreeMap<String, Value>,
pub blobs: BTreeMap<String, String>,
pub relations: BTreeMap<String, Vec<String>>,
pub seq: u64,
}Expand description
Per-account IoT Wireless control-plane state.
Fields§
§resources: BTreeMap<String, BTreeMap<String, Value>>resource_type -> id -> record. The record is the resource’s persisted
JSON attributes plus any minted ARN / id / timestamps.
Resource tags keyed by ARN.
singletons: BTreeMap<String, Value>Account-scoped singleton configurations keyed by a stable string.
blobs: BTreeMap<String, String>Raw @httpPayload blobs (e.g. resource GeoJSON positions) keyed by a
stable string. Stored base64-free as UTF-8 lossy strings.
relations: BTreeMap<String, Vec<String>>Many-to-many relationship sets keyed by a stable string.
seq: u64Monotonic counter used to mint unique ids within an account.
Implementations§
Source§impl IotWirelessData
impl IotWirelessData
Sourcepub fn get_resource(&self, rtype: &str, id: &str) -> Option<&Value>
pub fn get_resource(&self, rtype: &str, id: &str) -> Option<&Value>
Fetch a resource record by type + id.
Sourcepub fn put_resource(&mut self, rtype: &str, id: &str, record: Value)
pub fn put_resource(&mut self, rtype: &str, id: &str, record: Value)
Insert / replace a resource record.
Sourcepub fn remove_resource(&mut self, rtype: &str, id: &str) -> Option<Value>
pub fn remove_resource(&mut self, rtype: &str, id: &str) -> Option<Value>
Remove a resource record, returning it if present.
Sourcepub fn list_resources(&self, rtype: &str) -> Vec<Value>
pub fn list_resources(&self, rtype: &str) -> Vec<Value>
All records of a type, ordered by id.
Sourcepub fn list_resource_entries(&self, rtype: &str) -> Vec<(String, Value)>
pub fn list_resource_entries(&self, rtype: &str) -> Vec<(String, Value)>
All records of a type as (id, record) pairs, ordered by id.
Sourcepub fn get_singleton(&self, key: &str) -> Option<&Value>
pub fn get_singleton(&self, key: &str) -> Option<&Value>
Read a singleton configuration by its stable key.
Sourcepub fn put_singleton(&mut self, key: &str, value: Value)
pub fn put_singleton(&mut self, key: &str, value: Value)
Insert / replace a singleton configuration.
Sourcepub fn add_relation(&mut self, key: &str, member: &str)
pub fn add_relation(&mut self, key: &str, member: &str)
Add member to the ordered relationship set key (idempotent — a member
already present is not duplicated).
Sourcepub fn remove_relation(&mut self, key: &str, member: &str)
pub fn remove_relation(&mut self, key: &str, member: &str)
Remove member from the relationship set key; drops the empty set.
Sourcepub fn list_relation(&self, key: &str) -> Vec<String>
pub fn list_relation(&self, key: &str) -> Vec<String>
The members of relationship set key, in insertion order.
Trait Implementations§
Source§impl AccountState for IotWirelessData
impl AccountState for IotWirelessData
Source§fn new_for_account(_account_id: &str, _region: &str, _endpoint: &str) -> Self
fn new_for_account(_account_id: &str, _region: &str, _endpoint: &str) -> Self
Source§fn inherit_from(&mut self, _sibling: &Self)
fn inherit_from(&mut self, _sibling: &Self)
MultiAccountState::get_or_create,
with a reference to an existing sibling state. Services can override
this to propagate shared resources (e.g. body caches) to the new state.Source§impl Clone for IotWirelessData
impl Clone for IotWirelessData
Source§fn clone(&self) -> IotWirelessData
fn clone(&self) -> IotWirelessData
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more