[−][src]Struct prometrics::metrics::SummaryBuilder
Summary
builder.
Methods
impl SummaryBuilder
[src]
pub fn new(name: &str, window: Duration) -> Self
[src]
Makes a builder for summary named name
.
pub fn namespace(&mut self, namespace: &str) -> &mut Self
[src]
Sets the namespace part of the metric name of this.
pub fn subsystem(&mut self, subsystem: &str) -> &mut Self
[src]
Sets the subsystem part of the metric name of this.
pub fn help(&mut self, help: &str) -> &mut Self
[src]
Sets the help of this.
pub fn label(&mut self, name: &str, value: &str) -> &mut Self
[src]
Adds a label.
Note that name
will be validated in the invocation of the finish
method.
The name "quantile"
is reserved for designating summary quantiles.
pub fn registry(&mut self, registry: Registry) -> &mut Self
[src]
Adds a registry to which the resulting histograms will be registered.
pub fn default_registry(&mut self) -> &mut Self
[src]
Adds the default registry.
pub fn quantile(&mut self, quantile: f64) -> &mut Self
[src]
Adds a quantile.
pub fn finish(&self) -> Result<Summary>
[src]
Builds a summary.
Errors
This method will return Err(_)
if one of the following conditions is satisfied:
- Any of the name of the metric or labels is malformed
- There is a quantile whose value is less than
0.0
or greater than1.0
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for SummaryBuilder
impl Send for SummaryBuilder
impl !Sync for SummaryBuilder
impl Unpin for SummaryBuilder
impl !UnwindSafe for SummaryBuilder
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,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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.
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>,