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§
sourcefn test_get_value(&self, ping_name: Option<String>) -> Option<T>
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 insend_in_pings
.
§Returns
The stored value or None
if nothing stored.