[][src]Macro col_macros::btree_set

macro_rules! btree_set {
    (for $map:expr, ins $( $k:expr ),*) => { ... };
    (for $map:tt, ins $( $k:tt ,)*) => { ... };
    ( $( $k:expr ),*) => { ... };
    ( $( $k:tt ,)*) => { ... };
}

Construct or update a set of type BTSet<K> which can be and is an alias to BTreeSet in the types module.

All sets are accepted but if a set implements capacity and their respective methods hash_set! is preferred.

Examples

use col_macros::btree_set;
use col_macros::types::BTSet;

let mut hash = btree_set!["key1", "key2"];

assert!(hash.contains("key1"));
assert!(hash.contains("key2"));

btree_set![for &mut hash, ins "key3", "key4"];

assert!(hash.contains("key3"));
assert!(hash.contains("key4"));