pub struct JsonBuilder { /* private fields */ }
Expand description
Builder for JsonObserver
.
Implementations§
Source§impl JsonBuilder
impl JsonBuilder
Sourcepub fn new() -> JsonBuilder
pub fn new() -> JsonBuilder
Creates a new JsonBuilder
with default values.
Sourcepub fn set_quantiles(self, quantiles: &[f64]) -> JsonBuilder
pub fn set_quantiles(self, quantiles: &[f64]) -> JsonBuilder
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.
Sourcepub fn set_pretty_json(self, pretty: bool) -> JsonBuilder
pub fn set_pretty_json(self, pretty: bool) -> JsonBuilder
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§
Source§impl Builder for JsonBuilder
impl Builder for JsonBuilder
Source§type Output = JsonObserver
type Output = JsonObserver
The observer created by this builder.
Source§impl Default for JsonBuilder
impl Default for JsonBuilder
Source§fn default() -> JsonBuilder
fn default() -> JsonBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for JsonBuilder
impl RefUnwindSafe for JsonBuilder
impl Send for JsonBuilder
impl Sync for JsonBuilder
impl Unpin for JsonBuilder
impl UnwindSafe for JsonBuilder
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