Macros for container literals with specific type.
extern crate maplit;
#
The maplit crate uses =>
syntax for the mapping macros. It is
not possible to use :
as separator due to syntactic restrictions in
regular macro_rules!
macros.
Note that rust macros are flexible in which brackets you use for the invocation.
You can use them as hashmap!{}
or hashmap![]
or hashmap!()
.
This crate suggests {}
as the convention for the map & set macros,
it matches their Debug
output.
Generic container macros already exist elsewhere, so those are not provided here at the moment.