Struct phf_codegen::Map
source · pub struct Map<K> { /* private fields */ }
Expand description
A builder for the phf::Map
type.
Implementations§
source§impl<K: Hash + PhfHash + Eq + FmtConst> Map<K>
impl<K: Hash + PhfHash + Eq + FmtConst> Map<K>
sourcepub fn phf_path(&mut self, path: &str) -> &mut Map<K>
pub fn phf_path(&mut self, path: &str) -> &mut Map<K>
Set the path to the phf
crate from the global namespace
sourcepub fn entry(&mut self, key: K, value: &str) -> &mut Map<K>
pub 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.
sourcepub fn build(&self) -> DisplayMap<'_, K>
pub fn build(&self) -> DisplayMap<'_, K>
Auto Trait Implementations§
impl<K> RefUnwindSafe for Map<K>where K: RefUnwindSafe,
impl<K> Send for Map<K>where K: Send,
impl<K> Sync for Map<K>where K: Sync,
impl<K> Unpin for Map<K>where K: Unpin,
impl<K> UnwindSafe for Map<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