std-macro-extensions
A collection of macro extensions for Rust's standard library data structures, simplifying the creation and manipulation of common collections such as HashMap
, Vec
, and more.
Features
- Simplified Initialization: Use macros to easily create instances of common data structures.
- Supports Various Data Structures: Includes macros for
Vec
,HashMap
,Arc
, and more. - Easy to Use: Intuitive syntax for quick data structure creation.
Installation
To install std-macro-extensions
run cmd:
Usage
Here are some examples of how to use the macros provided by this crate:
Example: Using arc!
use *;
Example: Using vec!
use *;
Example: Using map!
use *;
Available Macros
arc!
: Creates anArc<T>
.vec!
: Creates aVec<T>
.map!
: Creates aHashMap<K, V>
.set!
: Creates aHashSet<T>
.b_tree_map!
: Creates aBTreeMap<K, V>
.b_tree_set!
: Creates aBTreeSet<T>
.list!
: Creates aLinkedList<T>
.heap!
: Creates aBinaryHeap<T>
.string!
: Creates aString
.box!
: Creates aBox<T>
.rc!
: Creates anRc<T>
.arc!
: Creates anArc<T>
.mutex!
: Creates aMutex<T>
.rw_lock!
: Creates aRwLock<T>
.cell!
: Creates aCell<T>
.ref_cell!
: Creates aRefCell<T>
.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Contributing
Contributions are welcome! Please open an issue or submit a pull request.
Contact
For any inquiries, please reach out to the author at ltpp-universe root@ltpp.vip.