pub fn new(name: &str, init_val: u64, shorthelp_text: &str, longhelp_text: &str) -> Result<Self, String> {
        let metric = Metric::new(
            name,
            init_val,
            Semantics::Counter,
            Unit::new().count(Count::One, 1)?,
            shorthelp_text,
            longhelp_text
        )?;

        Ok(Counter {
            metric: metric,
            init_val: init_val
        })
    }
/// Creates a new counter metric with given initial value
Creates a new counter metric with given initial value
Creates a new counter metric with given initial value
pub fn new(name: &str, init_val: u64, shorthelp_text: &str, longhelp_text: &str) -> Result<Self, String> {
        let metric = Metric::new(
            name,
            init_val,
            Semantics::Counter,
            Unit::new().count(Count::One, 1)?,
            shorthelp_text,
            longhelp_text
        )?;
        Ok(Counter {
            metric: metric,
            init_val: init_val
        })
    }
pub fn new ( name : & str , init_val : u64 , shorthelp_text : & str , longhelp_text : & str ) -> Result < Self , String > { let metric = Metric :: new ( name , init_val , Semantics :: Counter , Unit :: new ( ) . count ( Count :: One , 1 ) ? , shorthelp_text , longhelp_text ) ? ; Ok ( Counter { metric : metric , init_val : init_val } ) }
Creates a new counter metric with given initial value
Creates a new counter metric with given initial value
name
&str
init_val
u64
shorthelp_text
&str
longhelp_text
&str