Crates.io | map-macro |
lib.rs | map-macro |
version | 0.3.0 |
source | src |
created_at | 2021-05-11 15:34:55.480147 |
updated_at | 2024-01-29 15:59:52.851747 |
description | Declarative macros for statically initializing collections |
homepage | https://github.com/jofas/map_macro |
repository | https://github.com/jofas/map_macro |
max_upload_size | |
id | 396104 |
size | 41,511 |
This crate offers declarative macros for initializing collections from the standard library and hashbrown.
This crate has zero dependencies and is #![no_std]
if you opt-out of
support for the standard library collections.
use map_macro::hash_map;
let hello = hash_map! {
"en" => "Hello",
"de" => "Hallo",
"fr" => "Bonjour",
"es" => "Hola",
"cat" => "Hola",
"🌍" => "👋",
};