Trait cadence::ext::ToHistogramValue

source ·
pub trait ToHistogramValue {
    // Required method
    fn try_to_value(self) -> MetricResult<MetricValue>;
}
Expand description

Conversion trait for valid values for histograms

This trait must be implemented for any types that are used as histogram values (currently u64, f64, Duration, and Vecs of those types). This trait is internal to how values are formatted as part of metrics but is exposed publicly for documentation purposes.

Typical use of Cadence shouldn’t require interacting with this trait.

Required Methods§

Implementations on Foreign Types§

source§

impl ToHistogramValue for f64

source§

impl ToHistogramValue for u64

source§

impl ToHistogramValue for Vec<f64>

source§

impl ToHistogramValue for Vec<u64>

source§

impl ToHistogramValue for Vec<Duration>

source§

impl ToHistogramValue for Duration

Implementors§