pub trait MetricsGroupSet {
    // Required methods
    fn name(&self) -> &'static str;
    fn groups_cloned(&self) -> impl Iterator<Item = Arc<dyn MetricsGroup>>;
    fn groups(&self) -> impl Iterator<Item = &dyn MetricsGroup>;
    // Provided method
    fn iter(&self) -> impl Iterator<Item = (&'static str, MetricItem<'_>)> + '_ { ... }
}Expand description
Trait for a set of structs implementing MetricsGroup.
Required Methods§
Sourcefn groups_cloned(&self) -> impl Iterator<Item = Arc<dyn MetricsGroup>>
 
fn groups_cloned(&self) -> impl Iterator<Item = Arc<dyn MetricsGroup>>
Returns an iterator over owned clones of the MetricsGroup in this struct.
Sourcefn groups(&self) -> impl Iterator<Item = &dyn MetricsGroup>
 
fn groups(&self) -> impl Iterator<Item = &dyn MetricsGroup>
Returns an iterator over references to the MetricsGroup in this struct.
Provided Methods§
Sourcefn iter(&self) -> impl Iterator<Item = (&'static str, MetricItem<'_>)> + '_
 
fn iter(&self) -> impl Iterator<Item = (&'static str, MetricItem<'_>)> + '_
Returns an iterator over all metrics in this metrics group set.
The iterator yields tuples of (&str, MetricItem). The &str is the group name.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.