Struct sdset::multi::SymmetricDifference[][src]

pub struct SymmetricDifference<'a, T: 'a> { /* fields omitted */ }

Represent the symmetric difference set operation that will be applied to the 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]).symmetric_difference();

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

Methods

impl<'a, T> SymmetricDifference<'a, T>
[src]

Construct one with slices checked to be sorted and deduplicated.

Trait Implementations

impl<'a, T: Clone + 'a> Clone for SymmetricDifference<'a, T>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<'a, T: Ord + Clone> SetOperation<&'a T, T> for SymmetricDifference<'a, T>
[src]

Extend a Vec with the values of the Sets using this set operation.

Create a SetBuf using the SetOperation::extend_vec method.

impl<'a, T: Ord> SetOperation<&'a T, &'a T> for SymmetricDifference<'a, T>
[src]

Extend a Vec with the values of the Sets using this set operation.

Create a SetBuf using the SetOperation::extend_vec method.

Auto Trait Implementations

impl<'a, T> Send for SymmetricDifference<'a, T> where
    T: Sync

impl<'a, T> Sync for SymmetricDifference<'a, T> where
    T: Sync