pub fn build_map<'a, K: Eq + Hash + ConstInstantiable, V: ConstInstantiable>(
    keys: &'a [K],
    values: &'a [V]
) -> CodeWriter<'a, K, V>
Expand description

Generate code for a static quickphf::PhfMap.

Examples

use quickphf_codegen::*;

let roots = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
let fourth_powers = roots.map(|x| x * x * x * x);
let powers_to_roots = build_map(&fourth_powers, &roots);