map-macro

Crates.iomap-macro
lib.rsmap-macro
version0.3.0
sourcesrc
created_at2021-05-11 15:34:55.480147
updated_at2024-01-29 15:59:52.851747
descriptionDeclarative macros for statically initializing collections
homepagehttps://github.com/jofas/map_macro
repositoryhttps://github.com/jofas/map_macro
max_upload_size
id396104
size41,511
Jonas Fassbender (jofas)

documentation

README

map-macro

Build Status Latest Version Downloads Docs License: MIT

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.

Example

use map_macro::hash_map;

let hello = hash_map! {
    "en" => "Hello",
    "de" => "Hallo",
    "fr" => "Bonjour",
    "es" => "Hola",
    "cat" => "Hola",
    "🌍" => "👋",
};
Commit count: 117

cargo fmt