std-macro-extensions 1.0.1

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.
Documentation
1
2
3
4
5
6
7
8
9
10
/// Creates a new `Cell` instance.
///
/// This macro takes an expression and wraps it in a `Cell`, providing interior mutability for the given value.
/// The `Cell` type allows for mutation of its contents even when shared among multiple references.
#[macro_export]
macro_rules! cell {
    ($val:expr) => {
        std::cell::Cell::new($val)
    };
}