Struct prometheus::Opts
[−]
[src]
pub struct Opts { pub namespace: String, pub sub_system: String, pub name: String, pub help: String, pub const_labels: HashMap<String, String>, }
Opts
bundles the options for creating most Metric types.
Fields
namespace: String
sub_system: String
name: String
help: String
const_labels: HashMap<String, String>
Methods
impl Opts
[src]
fn new<S: Into<String>>(name: S, help: S) -> Opts
new
creates the Opts with the name
and help
arguments.
fn namespace<S: Into<String>>(self, namesapce: S) -> Self
namespace
sets the namespace.
fn sub_system<S: Into<String>>(self, sub_system: S) -> Self
sub_system
sets the sub system.
fn const_labels(self, labels: HashMap<String, String>) -> Self
const_labels
sets the const labels.
fn const_label<S: Into<String>>(self, name: S, value: S) -> Self
const_label
adds a const label.
fn fq_name(&self) -> String
fq_name
returns the fq_name.