[−][src]Struct prometheus::HistogramOpts
A struct that 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
A container holding various options.
buckets: Vec<f64>
Defines the buckets into which observations are counted. Each element in the slice is the upper inclusive bound of a bucket. The values must be sorted in strictly increasing order. There is no need to add a highest bucket with +Inf bound, it will be added implicitly. The default value is DefBuckets.
Methods
impl HistogramOpts
[src]
impl HistogramOpts
pub fn new<S: Into<String>>(name: S, help: S) -> HistogramOpts | [src] |
Create a HistogramOpts
with the name
and help
arguments.
pub fn namespace<S: Into<String>>(self, namesapce: S) -> Self | [src] |
namespace
sets the namespace.
pub fn subsystem<S: Into<String>>(self, subsystem: S) -> Self | [src] |
subsystem
sets the sub system.
pub fn const_labels(self, const_labels: HashMap<String, String>) -> Self | [src] |
const_labels
sets the const labels.
pub fn const_label<S: Into<String>>(self, name: S, value: S) -> Self | [src] |
const_label
adds a const label.
pub fn variable_labels(self, variable_labels: Vec<String>) -> Self | [src] |
variable_labels
sets the variable labels.
pub fn variable_label<S: Into<String>>(self, name: S) -> Self | [src] |
variable_label
adds a variable label.
pub fn fq_name(&self) -> String | [src] |
fq_name
returns the fq_name.
pub fn buckets(self, buckets: Vec<f64>) -> Self | [src] |
buckets
set the buckets.
Trait Implementations
impl Describer for HistogramOpts
[src]
impl Describer for HistogramOpts
impl From<Opts> for HistogramOpts
[src]
impl From<Opts> for HistogramOpts
fn from(opts: Opts) -> HistogramOpts | [src] |
impl Clone for HistogramOpts
[src]
impl Clone for HistogramOpts
fn clone(&self) -> HistogramOpts | [src] |
fn clone_from(&mut self, source: &Self) | 1.0.0 [src] |
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl Send for HistogramOpts
impl Send for HistogramOpts
impl Sync for HistogramOpts
impl Sync for HistogramOpts
Blanket Implementations
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error> | [src] |
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T | [src] |
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error> | [src] |
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId | [src] |