Trait hdrhistogram::iterators::PickyIterator[][src]

pub trait PickyIterator<T: Counter> {
    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; }

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

Required methods

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

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.

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

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).

Loading content...

Implementors

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

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

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

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

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

Loading content...