Struct slog_extlog::stats::Buckets [−][src]
pub struct Buckets {
pub method: BucketMethod,
pub label_name: &'static str,
// some fields omitted
}A set of numerical buckets together with a method for sorting values into them.
Fields
method: BucketMethod
The method to use to sort values into buckets.
label_name: &'static str
Label name describing what the buckets measure.
Methods
impl Buckets[src]
impl Bucketspub fn new(
method: BucketMethod,
label_name: &'static str,
limits: &[i64]
) -> Buckets[src]
pub fn new(
method: BucketMethod,
label_name: &'static str,
limits: &[i64]
) -> BucketsCreate a new Buckets instance.
pub fn assign_buckets(&self, value: f64) -> Vec<usize>[src]
pub fn assign_buckets(&self, value: f64) -> Vec<usize>return a vector containing the indices of the buckets that should be updated
pub fn len(&self) -> usize[src]
pub fn len(&self) -> usizeThe number of buckets.
pub fn is_empty(&self) -> bool[src]
pub fn is_empty(&self) -> boolWhether or not the number of buckets is greater than zero.
pub fn get(&self, index: usize) -> Option<BucketLimit>[src]
pub fn get(&self, index: usize) -> Option<BucketLimit>Get the bound of an individual bucket by index.
Trait Implementations
impl Debug for Buckets[src]
impl Debug for Bucketsfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Clone for Buckets[src]
impl Clone for Bucketsfn clone(&self) -> Buckets[src]
fn clone(&self) -> BucketsReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)1.0.0
[src]Performs copy-assignment from source. Read more
impl PartialEq for Buckets[src]
impl PartialEq for Buckets