Struct phf_codegen::OrderedMap
source · pub struct OrderedMap<K> { /* private fields */ }
Expand description
A builder for the phf::OrderedMap
type.
Implementations§
source§impl<K: Hash + PhfHash + Eq + FmtConst> OrderedMap<K>
impl<K: Hash + PhfHash + Eq + FmtConst> OrderedMap<K>
sourcepub fn new() -> OrderedMap<K>
pub fn new() -> OrderedMap<K>
Constructs a enw phf::OrderedMap
builder.
sourcepub fn phf_path(&mut self, path: &str) -> &mut OrderedMap<K>
pub fn phf_path(&mut self, path: &str) -> &mut OrderedMap<K>
Set the path to the phf
crate from the global namespace
sourcepub fn entry(&mut self, key: K, value: &str) -> &mut OrderedMap<K>
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.
sourcepub fn build(&self) -> DisplayOrderedMap<'_, K>
pub fn build(&self) -> DisplayOrderedMap<'_, K>
Auto Trait Implementations§
impl<K> RefUnwindSafe for OrderedMap<K>where K: RefUnwindSafe,
impl<K> Send for OrderedMap<K>where K: Send,
impl<K> Sync for OrderedMap<K>where K: Sync,
impl<K> Unpin for OrderedMap<K>where K: Unpin,
impl<K> UnwindSafe for OrderedMap<K>where K: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more