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
11
12
13
14
/// Creates a new `VecDeque` instance.
///
/// This macro can be used in two forms:
/// - Without arguments, it creates an empty `VecDeque`.
/// - With elements, it creates a `VecDeque` initialized with the provided elements.
#[macro_export]
macro_rules! vector_deque {
    () => {
        std::collections::VecDeque::new()
    };
    ($($elem:expr),*) => {
        std::collections::VecDeque::from([$($elem),*])
    };
}