Struct prometheus::HistogramOpts
[−]
[src]
pub struct HistogramOpts { pub common_opts: Opts, pub buckets: Vec<f64>, }
HistogramOpts
bundles the options for creating a Histogram metric. It is
mandatory to set Name and Help to a non-empty string. All other fields are
optional and can safely be left at their zero value.
Fields
common_opts: Opts
buckets: Vec<f64>
Methods
impl HistogramOpts
[src]
fn new<S: Into<String>>(name: S, help: S) -> HistogramOpts
[src]
new
creates a HistogramOpts
with the name
and help
arguments.
fn namespace<S: Into<String>>(self, namesapce: S) -> Self
[src]
namespace
sets the namespace.
fn subsystem<S: Into<String>>(self, subsystem: S) -> Self
[src]
subsystem
sets the sub system.
fn const_labels(self, const_labels: HashMap<String, String>) -> Self
[src]
const_labels
sets the const labels.
fn const_label<S: Into<String>>(self, name: S, value: S) -> Self
[src]
const_label
adds a const label.
fn variable_labels(self, variable_labels: Vec<String>) -> Self
[src]
variable_labels
sets the variable labels.
fn variable_label<S: Into<String>>(self, name: S) -> Self
[src]
variable_label
adds a variable label.
fn fq_name(&self) -> String
[src]
fq_name
returns the fq_name.
fn buckets(self, buckets: Vec<f64>) -> Self
[src]
buckets
set the buckets.
Trait Implementations
impl Clone for HistogramOpts
[src]
fn clone(&self) -> HistogramOpts
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl From<Opts> for HistogramOpts
[src]
fn from(opts: Opts) -> HistogramOpts
[src]
Performs the conversion.