pub struct LabeledHistogramBuilder<'a, W>where
W: Write,{ /* private fields */ }
Expand description
A helper for encoding histograms that use labels. See MetricsEncoder::histogram_vec.
Implementations§
Source§impl<W: Write> LabeledHistogramBuilder<'_, W>
impl<W: Write> LabeledHistogramBuilder<'_, W>
Sourcepub fn histogram(
self,
labels: &[(&str, &str)],
buckets: impl Iterator<Item = (f64, f64)>,
sum: f64,
) -> Result<Self>
pub fn histogram( self, labels: &[(&str, &str)], buckets: impl Iterator<Item = (f64, f64)>, sum: f64, ) -> Result<Self>
Encodes the metrics histogram observed for the given values of labels.
§Panics
This function panics if one of the labels does not match pattern [a-zA-Z_][a-zA-Z0-9_]. See https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels.
Auto Trait Implementations§
impl<'a, W> Freeze for LabeledHistogramBuilder<'a, W>
impl<'a, W> RefUnwindSafe for LabeledHistogramBuilder<'a, W>where
W: RefUnwindSafe,
impl<'a, W> Send for LabeledHistogramBuilder<'a, W>where
W: Send,
impl<'a, W> Sync for LabeledHistogramBuilder<'a, W>where
W: Sync,
impl<'a, W> Unpin for LabeledHistogramBuilder<'a, W>
impl<'a, W> !UnwindSafe for LabeledHistogramBuilder<'a, W>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more