Struct prometrics::metrics::GaugeBuilder
[−]
[src]
pub struct GaugeBuilder { /* fields omitted */ }
Gauge
builder.
Methods
impl GaugeBuilder
[src]
pub fn new(name: &str) -> Self
[src]
Makes a builder for gauges named name
.
ⓘImportant traits for &'a mut Wpub fn namespace(&mut self, namespace: &str) -> &mut Self
[src]
ⓘImportant traits for &'a mut W
Sets the namespace part of the metric name of this.
ⓘImportant traits for &'a mut Wpub fn subsystem(&mut self, subsystem: &str) -> &mut Self
[src]
ⓘImportant traits for &'a mut W
Sets the subsystem part of the metric name of this.
ⓘImportant traits for &'a mut Wpub fn help(&mut self, help: &str) -> &mut Self
[src]
ⓘImportant traits for &'a mut W
Sets the help of this.
ⓘImportant traits for &'a mut Wpub fn label(&mut self, name: &str, value: &str) -> &mut Self
[src]
ⓘImportant traits for &'a mut W
Adds a label.
Note that name
will be validated in the invocation of the finish
method.
ⓘImportant traits for &'a mut Wpub fn registry(&mut self, registry: Registry) -> &mut Self
[src]
ⓘImportant traits for &'a mut W
Adds a registry to which the resulting gauges will be registered.
ⓘImportant traits for &'a mut Wpub fn default_registry(&mut self) -> &mut Self
[src]
ⓘImportant traits for &'a mut W
Adds the default registry.
ⓘImportant traits for &'a mut Wpub fn initial_value(&mut self, value: f64) -> &mut Self
[src]
ⓘImportant traits for &'a mut W
Sets the initial value of resulting gauges.
pub fn finish(&self) -> Result<Gauge>
[src]
Builds a gauge.
Errors
This method will return Err(_)
if any of the name of the metric or labels is malformed.