Skip to main content

orderset

Macro orderset 

Source
macro_rules! orderset {
    () => { ... };
    ($($value:expr),+ $(,)?) => { ... };
}
Available on crate feature std only.
Expand description

Create an OrderSet from a list of values

ยงExample

use ordermap::orderset;

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"));