Module sdset::multi

source ·
Expand description

Contains the types to make set operations on any given number of slices.

Examples

use sdset::multi::OpBuilder;
use sdset::{SetOperation, Set, SetBuf};

let a = Set::new(&[1, 2, 4])?;
let b = Set::new(&[2, 3, 5, 7])?;
let c = Set::new(&[4, 6, 7])?;

let op = OpBuilder::from_vec(vec![a, b, c]).union();

let res: SetBuf<i32> = op.into_set_buf();
assert_eq!(&res[..], &[1, 2, 3, 4, 5, 6, 7]);

Structs

Represent the difference set operation that will be applied to the slices.
Represent the intersection set operation that will be applied to the slices.
Type used to acquire any number of slices and make a set operation on these slices.
Represent the symmetric difference set operation that will be applied to the slices.
Represent the union set operation that will be applied to the slices.