Struct b2histogram::Base2Histogram
source · pub struct Base2Histogram { /* private fields */ }
Expand description
A compact and efficient integer histogram with fixed memory footprint, constant runtime performance, and very compact binary serialization.
Implementations§
source§impl Base2Histogram
impl Base2Histogram
sourcepub fn observations(&self, value: u64) -> u64
pub fn observations(&self, value: u64) -> u64
Returns the number of observations recorded by the bucket containing value
To retrieve the number of observations along with its bucket bounds, see
bucket_for()
.
sourcepub fn bucket_for(&self, value: u64) -> Bucket
pub fn bucket_for(&self, value: u64) -> Bucket
Return the Bucket
to which value
belongs.
To retrieve only the number of observations see
observations()
.
sourcepub fn nonzero_buckets(&self) -> u32
pub fn nonzero_buckets(&self) -> u32
Returns the number of buckets with one or more observations
sourcepub fn has_counts(&self, value: u64) -> bool
pub fn has_counts(&self, value: u64) -> bool
Returns true
if the bucket count corresponding to value
is non-zero
Auto Trait Implementations§
impl RefUnwindSafe for Base2Histogram
impl Send for Base2Histogram
impl Sync for Base2Histogram
impl Unpin for Base2Histogram
impl UnwindSafe for Base2Histogram
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more