pub trait PickyIterator<T: Counter> {
    // Required methods
    fn pick(
        &mut self,
        index: usize,
        total_count_to_index: u64,
        count_at_index: T
    ) -> Option<PickMetadata>;
    fn more(&mut self, index_to_pick: usize) -> bool;
}
Expand description

A trait for designing an subset iterator over values in a Histogram.

Required Methods§

source

fn pick( &mut self, index: usize, total_count_to_index: u64, count_at_index: T ) -> Option<PickMetadata>

Return Some if an IterationValue should be emitted at this point.

index is a valid index in the relevant histogram.

This will be called with the same index until it returns None. This enables modes of iteration that pick different values represented by the same bucket, for instance.

source

fn more(&mut self, index_to_pick: usize) -> bool

Should we keep iterating even though the last index with non-zero count has already been picked at least once?

This will be called on every iteration once the last index with non-zero count has been picked, even if the index was not advanced in the last iteration (because pick() returned Some).

Implementors§

source§

impl<'a, T: 'a + Counter> PickyIterator<T> for hdrhistogram::iterators::linear::Iter<'a, T>

source§

impl<'a, T: 'a + Counter> PickyIterator<T> for hdrhistogram::iterators::log::Iter<'a, T>

source§

impl<'a, T: 'a + Counter> PickyIterator<T> for hdrhistogram::iterators::quantile::Iter<'a, T>

source§

impl<T: Counter> PickyIterator<T> for hdrhistogram::iterators::all::Iter

source§

impl<T: Counter> PickyIterator<T> for hdrhistogram::iterators::recorded::Iter