extern crate crdt_rs as crdt; use crdt::GSet; fn main() { let mut a: GSet = vec!(1i32, 2, 3).into_iter().collect(); a.insert(4); println!("Set A: {:?}", a); let b: GSet = vec!(3i32, 4, 5, 6).into_iter().collect(); // Intersection example let intersection: GSet = a.intersection(&b).into_iter().collect(); println!("Set B: {:?}", b); println!("Intersection: {:?}", intersection); // Difference example let difference: GSet = a.difference(&b).into_iter().collect(); println!("Difference: {:?}", difference); // Union example let union: GSet = a.union(&b).into_iter().collect(); println!("Union: {:?}", union); }