[][src]Trait prometheus::core::Number

pub trait Number: Sized + AddAssign + SubAssign + PartialOrd + PartialEq + Copy + Send + Sync {
    fn from_i64(v: i64) -> Self;
fn into_f64(self) -> f64; }

An interface for numbers. Used to generically model float metrics and integer metrics, i.e. Counter and IntCounter.

Required methods

fn from_i64(v: i64) -> Self

std::convert::From<i64> for f64 is not implemented, so that we need to implement our own.

fn into_f64(self) -> f64

Convert to a f64.

Loading content...

Implementations on Foreign Types

impl Number for i64
[src]

impl Number for u64
[src]

impl Number for f64
[src]

Loading content...

Implementors

Loading content...