macro_rules! orderset { (@single $($x:tt)*) => { ... }; (@count $($rest:expr),*) => { ... }; ($($value:expr,)+) => { ... }; ($($value:expr),*) => { ... }; }
Expand description
Create an OrderSet
from a list of values
Example
#[macro_use] extern crate ordermap;
let set = orderset!{
"a",
"b",
};
assert!(set.contains("a"));
assert!(set.contains("b"));
assert!(!set.contains("c"));
// "a" is the first value
assert_eq!(set.iter().next(), Some(&"a"));