Struct phf_codegen::Map
[−]
[src]
pub struct Map<K> {
// some fields omitted
}A builder for the phf::Map type.
Methods
impl<K: Hash + PhfHash + Eq + Debug> Map<K>
fn new() -> Map<K>
Creates a new phf::Map builder.
fn entry(&mut self, key: K, value: &str) -> &mut Map<K>
Adds an entry to the builder.
value will be written exactly as provided in the constructed source.
fn build<W: Write>(&self, w: &mut W) -> Result<()>
Constructs a phf::Map, outputting Rust source to the provided writer.
Panics
Panics if there are any duplicate keys.