Struct histogram::Config [−][src]
A configuration struct for building custom Histogram
s.
Implementations
impl Config
[src]
pub fn new() -> Config
[src]
pub fn precision(self, precision: u32) -> Self
[src]
set HistogramConfig precision
Example
let mut c = Histogram::configure(); c.precision(4); // set to 4 significant figures
pub fn max_memory(self, bytes: u32) -> Self
[src]
set HistogramConfig memory limit
Example
let mut c = Histogram::configure(); c.max_memory(1024*1024); // cap Histogram at 1MB of data
pub fn max_value(self, max: u64) -> Self
[src]
set HistogramConfig value limit
Example
let mut c = Histogram::configure(); c.max_value(1000); // values above 1000 will not be stored
pub fn build(self) -> Option<Histogram>
[src]
Build a new histogram based on the current configuration
values. Return None
if the new histogram would require more
than the configured memory size.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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, 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>,