rust-phf
rust-phf copied to clipboard
Support for tuples
I would like to be able to make a set of tuples, like so:
use phf::phf_set;
static MY_SET: phf::Set<(&str, u32, &[&str])> = phf_set! {
("some value", 1, &["even", "more", "values"]),
};
This is currently not possible it seems. I am guessing it's also not possible to use tuples as keys in phf::Map
You can work around this by using phf_map with the first value as key and the rest as the resulting value but that isn't very ergonomic and also only works if the first value is unique.
As with #183 it would be good for this limitation to be clearly documented.