Trait glean_core::metrics::TestGetValue

source ·
pub trait TestGetValue<T> {
    // Required method
    fn test_get_value(&self, ping_name: Option<String>) -> Option<T>;
}
Expand description

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

Required Methods§

source

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

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§