[][src]Macro phf::phf_set

macro_rules! phf_set {
    #[::proc_macro_hack::proc_macro_hack] => { ... };
}

Macro to create a static (compile-time) Set.

Requires the "macros" feature.

Example

This code runs with edition 2018
use ::phf::{phf_set, Set};

static MY_SET: Set<&'static str> = phf_set! {
    "hello world",
    "hola mundo",
};

fn main ()
{
    assert!(MY_SET.contains("hello world"));
}