Skip to main content

MappingStrategy

Trait MappingStrategy 

Source
pub trait MappingStrategy {
    // Required method
    fn map(&self, count: u32, max_count: u32, num_colors: usize) -> usize;
}
Expand description

Defines how to map counts to color indices.

Required Methods§

Source

fn map(&self, count: u32, max_count: u32, num_colors: usize) -> usize

Maps a count to a color index [0, num_colors).

Implementors§