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.

Implementations

impl Buckets[src]

pub fn new(
    method: BucketMethod,
    label_name: &'static str,
    limits: &[i64]
) -> Buckets
[src]

Create a new Buckets instance.

pub fn assign_buckets(&self, value: f64) -> Vec<usize>[src]

return a vector containing the indices of the buckets that should be updated

pub fn len(&self) -> usize[src]

The number of buckets.

pub fn is_empty(&self) -> bool[src]

Whether or not the number of buckets is greater than zero.

pub fn get(&self, index: usize) -> Option<BucketLimit>[src]

Get the bound of an individual bucket by index.

Trait Implementations

impl Clone for Buckets[src]

impl Debug for Buckets[src]

impl PartialEq<Buckets> for Buckets[src]

impl Serialize for Buckets[src]

impl StructuralPartialEq for Buckets[src]

Auto Trait Implementations

impl RefUnwindSafe for Buckets

impl Send for Buckets

impl Sync for Buckets

impl Unpin for Buckets

impl UnwindSafe for Buckets

Blanket Implementations

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

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

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

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

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

impl<T> SendSyncUnwindSafe for T where
    T: Send + Sync + UnwindSafe + ?Sized
[src]

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

impl<T> SlogValueDerivable for T where
    T: Debug + Clone + Serialize + Send + 'static, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.