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