#proc-macro #hash-map #key-value #language #control #list #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

#2929 in Rust patterns

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

~61KB