Struct phf_codegen::OrderedMap [] [src]

pub struct OrderedMap<K> {
    // some fields omitted
}

A builder for the phf::OrderedMap type.

Methods

impl<K: Hash + PhfHash + Eq + Debug> OrderedMap<K>
[src]

fn new() -> OrderedMap<K>

Constructs a enw phf::OrderedMap builder.

fn entry(&mut self, key: K, value: &str) -> &mut OrderedMap<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::OrderedMap, outputting Rust source to the provided writer.

Panics

Panics if there are any duplicate keys.