#hash-map #proc-macro #macro #maplit

macro helper

A library provided some useful proc macros for Rust

7 releases (stable)

3.3.0 Jul 29, 2022
3.2.0 Jun 30, 2022
3.1.0 Jan 27, 2022
2.1.0-alpha.1 Aug 27, 2021
1.0.0 Jun 8, 2019

#1565 in Rust patterns

Download history 3/week @ 2024-07-19 17/week @ 2024-07-26 10/week @ 2024-09-20

313 downloads per month

MulanPSL-2.0

23KB
545 lines

Helper

Rust Crate API

A library provided some useful proc macros for Rust.

Macros

  • control flow

    • either: Ternary operator in many C-like languages.
    • try_option: Unwrap std::option::Option, if none, return the alternative value.
  • collections

    • btmap: Create std::collections::BTreeMap from list of key-value pairs.
    • btset: Create a std::collections::BTreeSet from a list of elements.
    • hmap: Create std::collections::HashMap from list of key-value pairs.
    • hset: Create a std::collections::HashSet from a list of elements.

License

MulanPSL-2.0

Dependencies

~56KB