1 unstable release
0.1.0 | Nov 2, 2020 |
---|
#2014 in Data structures
26KB
670 lines
Wrapper for sets like HashSet or BTreeSet that allows full boolean operations including negation
TLDR
use maplit::btreeset;
use negatable_set::NegatableSet;
use std::collections::BTreeSet;
type Test = NegatableSet<BTreeSet<u64>>;
fn main() {
let a = Test::from(btreeset! { 3,4,5 });
let b = Test::from(btreeset! { 1,2,3 });
let c = !&b;
let d = &a | &c;
println!("{:?} {:?} {:?} {:?}", a, b, c, d);
}
Dependencies
~100–435KB