Trait glean_core::metrics::TestGetValue

source ·
pub trait TestGetValue {
    type Output;

    // Required method
    fn test_get_value(&self, ping_name: Option<String>) -> Option<Self::Output>;
}
Expand description

TestGetValue describes an interface for retrieving the value for a given metric

Required Associated Types§

source

type Output

The output type of test_get_value

Required Methods§

source

fn test_get_value(&self, ping_name: Option<String>) -> Option<Self::Output>

Test-only API (exported for FFI purposes).

Returns the currently stored value of the appropriate type for the given metric.

This doesn’t clear the stored value.

§Arguments
  • ping_name - the optional name of the ping to retrieve the metric for. Defaults to the first value in send_in_pings.
§Returns

The stored value or None if nothing stored.

Implementors§

source§

impl TestGetValue for BooleanMetric

source§

impl TestGetValue for CounterMetric

source§

impl TestGetValue for CustomDistributionMetric

source§

impl TestGetValue for DatetimeMetric

source§

impl TestGetValue for DenominatorMetric

source§

impl TestGetValue for DualLabeledCounterMetric

source§

impl TestGetValue for EventMetric

source§

impl TestGetValue for MemoryDistributionMetric

source§

impl TestGetValue for NumeratorMetric

source§

impl TestGetValue for ObjectMetric

source§

impl TestGetValue for QuantityMetric

source§

impl TestGetValue for RateMetric

source§

impl TestGetValue for StringListMetric

source§

impl TestGetValue for StringMetric

source§

impl TestGetValue for TextMetric

source§

impl TestGetValue for TimespanMetric

source§

impl TestGetValue for TimingDistributionMetric

source§

impl TestGetValue for UrlMetric

source§

impl TestGetValue for UuidMetric

source§

impl<T, S> TestGetValue for LabeledMetric<T>
where T: AllowLabeled + TestGetValue<Output = S>, S: Any,