[−][src]Struct substrate_prometheus_endpoint::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, Global>
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.
Implementations
impl HistogramOpts
[src]
pub fn new<S1, S2>(name: S1, help: S2) -> HistogramOpts where
S1: Into<String>,
S2: Into<String>,
[src]
S1: Into<String>,
S2: Into<String>,
Create a HistogramOpts
with the name
and help
arguments.
pub fn namespace<S>(self, namesapce: S) -> HistogramOpts where
S: Into<String>,
[src]
S: Into<String>,
namespace
sets the namespace.
pub fn subsystem<S>(self, subsystem: S) -> HistogramOpts where
S: Into<String>,
[src]
S: Into<String>,
subsystem
sets the sub system.
pub fn const_labels(
self,
const_labels: HashMap<String, String, RandomState>
) -> HistogramOpts
[src]
self,
const_labels: HashMap<String, String, RandomState>
) -> HistogramOpts
const_labels
sets the const labels.
pub fn const_label<S1, S2>(self, name: S1, value: S2) -> HistogramOpts where
S1: Into<String>,
S2: Into<String>,
[src]
S1: Into<String>,
S2: Into<String>,
const_label
adds a const label.
pub fn variable_labels(
self,
variable_labels: Vec<String, Global>
) -> HistogramOpts
[src]
self,
variable_labels: Vec<String, Global>
) -> HistogramOpts
variable_labels
sets the variable labels.
pub fn variable_label<S>(self, name: S) -> HistogramOpts where
S: Into<String>,
[src]
S: Into<String>,
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, Global>) -> HistogramOpts
[src]
buckets
set the buckets.
Trait Implementations
impl Clone for HistogramOpts
[src]
pub fn clone(&self) -> HistogramOpts
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for HistogramOpts
[src]
impl Describer for HistogramOpts
[src]
impl From<Opts> for HistogramOpts
[src]
pub fn from(opts: Opts) -> HistogramOpts
[src]
Auto Trait Implementations
impl RefUnwindSafe for HistogramOpts
[src]
impl Send for HistogramOpts
[src]
impl Sync for HistogramOpts
[src]
impl Unpin for HistogramOpts
[src]
impl UnwindSafe for HistogramOpts
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,