[][src]Struct metrics_observer_json::JsonBuilder

pub struct JsonBuilder { /* fields omitted */ }

Builder for JsonObserver.

Methods

impl JsonBuilder[src]

pub fn new() -> Self[src]

Creates a new JsonBuilder with default values.

pub fn set_quantiles(self, quantiles: &[f64]) -> Self[src]

Sets the quantiles to use when rendering histograms.

Quantiles represent a scale of 0 to 1, where percentiles represent a scale of 1 to 100, so a quantile of 0.99 is the 99th percentile, and a quantile of 0.99 is the 99.9th percentile.

By default, the quantiles will be set to: 0.0, 0.5, 0.9, 0.95, 0.99, 0.999, and 1.0.

pub fn set_pretty_json(self, pretty: bool) -> Self[src]

Sets whether or not to render the JSON as "pretty."

Pretty JSON refers to the formatting and identation, where different fields are on different lines, and depending on their depth from the root object, are indented.

By default, pretty mode is not enabled.

Trait Implementations

impl Default for JsonBuilder[src]

impl Builder for JsonBuilder[src]

type Output = JsonObserver

The observer created by this builder.

Auto Trait Implementations

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]