[][src]Trait glean_core::metrics::MetricType

pub trait MetricType {
    fn meta(&self) -> &CommonMetricData;
fn meta_mut(&mut self) -> &mut CommonMetricData; fn should_record(&self, glean: &Glean) -> bool { ... } }

A MetricType describes common behavior across all metrics.

Required methods

fn meta(&self) -> &CommonMetricData

Access the stored metadata

fn meta_mut(&mut self) -> &mut CommonMetricData

Access the stored metadata mutable

Loading content...

Provided methods

fn should_record(&self, glean: &Glean) -> bool

Whether this metric should currently be recorded

This depends on the metrics own state, as determined by its metadata, and whether upload is enabled on the Glean object.

Loading content...

Implementors

impl MetricType for BooleanMetric[src]

impl MetricType for CounterMetric[src]

impl MetricType for CustomDistributionMetric[src]

impl MetricType for DatetimeMetric[src]

impl MetricType for EventMetric[src]

impl MetricType for MemoryDistributionMetric[src]

impl MetricType for QuantityMetric[src]

impl MetricType for StringListMetric[src]

impl MetricType for StringMetric[src]

impl MetricType for TimespanMetric[src]

impl MetricType for TimingDistributionMetric[src]

impl MetricType for UuidMetric[src]

Loading content...