Struct slog_extlog::stats::Buckets [−][src]
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]
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 Clone for Buckets
[src]
impl Debug for Buckets
[src]
impl PartialEq<Buckets> for Buckets
[src]
impl Serialize for Buckets
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
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]
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> 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,
pub fn erased_serialize(
&self,
serializer: &mut dyn Serializer
) -> Result<Ok, Error>
[src]
&self,
serializer: &mut dyn Serializer
) -> Result<Ok, Error>
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.
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>,