Struct sdset::duo::Union[][src]

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

Represent the union set operation that will be applied to two slices.

Examples

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

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

let op = OpBuilder::new(a, b).union();

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

Methods

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

Construct one with slices checked to be sorted and deduplicated.

Trait Implementations

impl<'a, T: Copy + 'a> Copy for Union<'a, T>
[src]

impl<'a, T: Clone + 'a> Clone for Union<'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 Union<'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 Union<'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 Union<'a, T> where
    T: Sync

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