pub fn state_change_for(
sub: &PushSubscription,
changed: &BTreeMap<Id, BTreeMap<String, State>>,
) -> Option<StateChange>Expand description
The StateChange to push to sub for the changed map, or None if
none of its types changed.
RFC 8620 §7.2 (rfc8620.txt:3669-3672): “A StateChange notification will
only be sent if the data for one of these types changes. Other types are
omitted from the TypeState object. If null, changes will be pushed for
all types.” Accounts left with no types are dropped.
This does not check which accounts the subscription’s credentials may see; the caller passes only those.