[][src]Struct phf_codegen::Map

pub struct Map<K> { /* fields omitted */ }

A builder for the phf::Map type.

Methods

impl<K: Hash + PhfHash + Eq + FmtConst> Map<K>[src]

pub fn new() -> Map<K>[src]

Creates a new phf::Map builder.

pub fn phf_path(&mut self, path: &str) -> &mut Map<K>[src]

Set the path to the phf crate from the global namespace

pub fn entry(&mut self, key: K, value: &str) -> &mut Map<K>[src]

Adds an entry to the builder.

value will be written exactly as provided in the constructed source.

pub fn build(&self) -> DisplayMap<K>[src]

Calculate the hash parameters and return a struct implementing Display which will print the constructed phf::Map.

Panics

Panics if there are any duplicate keys.

Auto Trait Implementations

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

impl<K> RefUnwindSafe for Map<K> where
    K: RefUnwindSafe

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,