macro_rules! b_tree_set {
() => { ... };
($($elem:expr),*) => { ... };
}Expand description
Creates a new BTreeSet<T>.
This macro provides two ways to initialize a BTreeSet:
-
Empty Set:
- Calling
b_tree_set!()creates an emptyBTreeSet.
- Calling
-
With Elements:
- You can also initialize a
BTreeSetwith elements by providing a comma-separated list of values, e.g.,b_tree_set!(1, 2, 3). - This will create a
BTreeSetcontaining the specified elements.
- You can also initialize a
ยงExamples
use std_macro_extensions::*;
let empty_set: BTreeSet<i32> = b_tree_set!();
let number_set: BTreeSet<i32> = b_tree_set!(1, 2, 3);