mapro
A tiny macro library for creating std::collections.
Overview
mapro provides a set of convenient macros for creating various standard library collections, such as HashMap, BTreeMap, HashSet, BTreeSet, VecDeque, and BinaryHeap.
The name mapro is a portmanteau of "macro" and "map", but the library handles more than just map types.
Usage
To use mapro, add it to your Cargo.toml dependencies:
[]
= "0.1.0"
or run:
Then import the macros you want to use in your Rust files:
use ;
Examples
Creating a HashMap:
let m = map!;
assert_eq!;
assert_eq!;
Creating a HashSet:
let s = set!;
assert!;
assert!;
assert!;
Features
-
Simple API: Using
maprois as straightforward as using any Rust macro. -
No Extra Dependencies:
maproonly depends on the standard library. -
Broad Collection Support: Supports various standard library collections out of the box.
Contributing
Interested in contributing? Submit a pull request!
License
This project is licensed under the MIT License.
Authors
- Patrick Unick: dev_storm@winux.com