Trait frequency::Frequency [] [src]

pub trait Frequency<'t, T> where
    &'t Self: 't + IntoIterator,
    T: 't + Eq
{ type N: Num; type Iter: Iterator<Item = (&'t T, &'t Self::N)>; type Items: Iterator<Item = &'t T>; type Counts: Iterator<Item = &'t Self::N>; fn count(&self, value: &T) -> Self::N; fn increment(&mut self, value: T); fn iter(&'t self) -> Self::Iter; fn items(&'t self) -> Self::Items; fn counts(&'t self) -> Self::Counts; }

Associated Types

The type used to record counts.

The type of an iterator over item-count pairs.

The type of an iterator over items.

The type of an iterator over counts.

Required Methods

Returns the count of an item.

Increments the count for an item.

An iterator visiting all key-value pairs. Iterator element type is (&'t T, &'t usize).

An iterator visiting all keys in arbitrary order. Iterator element type is &'t T.

An iterator visiting all counts in arbitrary order. Iterator element type is &'t usize.

Implementors