Trait cadence::ext::ToCounterValue

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

Conversion trait for valid values for counters

This trait must be implemented for any types that are used as counter values (currently i64, i32, u64, and u32). 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 ToCounterValue for i32

source§

impl ToCounterValue for i64

source§

impl ToCounterValue for u32

source§

impl ToCounterValue for u64

Implementors§