[−][src]Struct slog_extlog::stats::Buckets
A set of numerical buckets together with a method for sorting values into them.
Fields
method: BucketMethodThe method to use to sort values into buckets.
label_name: &'static strLabel name describing what the buckets measure.
Methods
impl Buckets[src]
pub fn new(
method: BucketMethod,
label_name: &'static str,
limits: &[i64]
) -> Buckets[src]
method: BucketMethod,
label_name: &'static str,
limits: &[i64]
) -> Buckets
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 PartialEq<Buckets> for Buckets[src]
impl Clone for Buckets[src]
fn clone(&self) -> Buckets[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl Debug for Buckets[src]
impl Serialize for Buckets[src]
Auto Trait Implementations
Blanket Implementations
impl<T> SlogValueDerivable for T where
T: Debug + Clone + Serialize + Send + 'static, [src]
T: Debug + Clone + Serialize + Send + 'static,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> From<T> for 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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> SendSyncUnwindSafe for T where
T: Send + Sync + UnwindSafe + ?Sized, [src]
T: Send + Sync + UnwindSafe + ?Sized,
impl<T> Serialize for T where
T: Serialize + ?Sized, [src]
T: Serialize + ?Sized,