pub fn new(name: &str, init_val: f64, instances: &[&str],
        shorthelp_text: &str, longhelp_text: &str) -> Result<Self, String> {
        
        let indom_helptext = format!("Instance domain for GaugeVector '{}'", name);
        let indom = Indom::new(instances, &indom_helptext, &indom_helptext)?;
        
        let im = InstanceMetric::new(
            &indom,
            name,
            init_val,
            Semantics::Counter,
            Unit::new().count(Count::One, 1)?,
            shorthelp_text,
            longhelp_text
        )?;

        Ok(GaugeVector {
            im: im,
            indom: indom,
            init_val: init_val
        })
    }
/// Creates a new gauge vector with given initial value and instances
Creates a new gauge vector with given initial value and instances
Creates a new gauge vector with given initial value and instances
pub fn new(name: &str, init_val: f64, instances: &[&str],
        shorthelp_text: &str, longhelp_text: &str) -> Result<Self, String> {
        let indom_helptext = format!("Instance domain for GaugeVector '{}'", name);
        let indom = Indom::new(instances, &indom_helptext, &indom_helptext)?;
        let im = InstanceMetric::new(
            &indom,
            name,
            init_val,
            Semantics::Counter,
            Unit::new().count(Count::One, 1)?,
            shorthelp_text,
            longhelp_text
        )?;
        Ok(GaugeVector {
            im: im,
            indom: indom,
            init_val: init_val
        })
    }
pub fn new ( name : & str , init_val : f64 , instances : & [ & str ] , shorthelp_text : & str , longhelp_text : & str ) -> Result < Self , String > { let indom_helptext = format ! ( " " name ) ; let indom = Indom :: new ( instances , & indom_helptext , & indom_helptext ) ? ; let im = InstanceMetric :: new ( & indom , name , init_val , Semantics :: Counter , Unit :: new ( ) . count ( Count :: One , 1 ) ? , shorthelp_text , longhelp_text ) ? ; Ok ( GaugeVector { im : im , indom : indom , init_val : init_val } ) }
Creates a new gauge vector with given initial value and instances
Creates a new gauge vector with given initial value and instances
name
&str
init_val
f64
instances
&[&str]
shorthelp_text
&str
longhelp_text
&str