Hello,
In an effort to reduce the number of special purpose constructs in favor of more standard ones, RTCStatsMember<T> and its abstraction RTCStatsMemberInterface will be removed in favor of using absl::optional<T> to represent GetStats() statistics.
For those referring the C++ fields of the
RTCStats objects directly, little will change but you should make sure to use `stat.has_value()` instead of `stat.is_defined()` to be compatible with the upcoming absl::optional<T> change.
For those iterating all stats members in a more abstract way, you need to migrate from RTCStats::Members() returning a list of const RTCStatsMemberInterface* to RTCStats::Attributes(), returning a list of Attributes. The Members() method will soon be deleted.
The Attribute can be used in a similar way as RTCStatsMemberInterface, e.g.
```
// for each attribute in rtc_stats.Attributes()...
if (!attribute.has_value())
continue;
if (attribute.holds_alternative<std::string>()) {
RTC_LOG(LS_INFO) <<
attribute.name() << " is a string with value: \"" << attribute.get<std::string>() << "\".";
}
```
For reference,
here is an example of migrating from members to attributes.