Struct phf_codegen::OrderedMap [−][src]
pub struct OrderedMap<K> { /* fields omitted */ }
A builder for the phf::OrderedMap
type.
Methods
impl<K: Hash + PhfHash + Eq + Debug> OrderedMap<K>
[src]
impl<K: Hash + PhfHash + Eq + Debug> OrderedMap<K>
pub fn new() -> OrderedMap<K>
[src]
pub fn new() -> OrderedMap<K>
Constructs a enw phf::OrderedMap
builder.
pub fn phf_path(&mut self, path: &str) -> &mut OrderedMap<K>
[src]
pub fn phf_path(&mut self, path: &str) -> &mut OrderedMap<K>
Set the path to the phf
crate from the global namespace
pub fn entry(&mut self, key: K, value: &str) -> &mut OrderedMap<K>
[src]
pub 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.
pub fn build<W: Write>(&self, w: &mut W) -> Result<()>
[src]
pub 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.
Auto Trait Implementations
impl<K> Send for OrderedMap<K> where
K: Send,
impl<K> Send for OrderedMap<K> where
K: Send,
impl<K> Sync for OrderedMap<K> where
K: Sync,
impl<K> Sync for OrderedMap<K> where
K: Sync,