[][src]Struct sdset::duo::Difference

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

Represent the difference 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).difference();

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

Methods

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

pub fn new(a: &'a Set<T>, b: &'a Set<T>) -> Self[src]

Construct one with slices checked to be sorted and deduplicated.

Trait Implementations

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

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

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

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

Auto Trait Implementations

impl<'a, T> RefUnwindSafe for Difference<'a, T> where
    T: RefUnwindSafe

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

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

impl<'a, T> Unpin for Difference<'a, T>

impl<'a, T> UnwindSafe for Difference<'a, T> where
    T: RefUnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.