Struct sdset::duo::Intersection [−][src]
pub struct Intersection<'a, T: 'a> { /* fields omitted */ }
Represent the intersection 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).intersection(); let res: SetBuf<i32> = op.into_set_buf(); assert_eq!(&res[..], &[2, 4, 6, 7]);
Methods
impl<'a, T> Intersection<'a, T>
[src]
impl<'a, T> Intersection<'a, T>
pub fn new(a: &'a Set<T>, b: &'a Set<T>) -> Self
[src]
pub fn new(a: &'a Set<T>, b: &'a Set<T>) -> Self
Construct one with slices checked to be sorted and deduplicated.
Trait Implementations
impl<'a, T: Copy + 'a> Copy for Intersection<'a, T>
[src]
impl<'a, T: Copy + 'a> Copy for Intersection<'a, T>
impl<'a, T: Clone + 'a> Clone for Intersection<'a, T>
[src]
impl<'a, T: Clone + 'a> Clone for Intersection<'a, T>
fn clone(&self) -> Intersection<'a, T>
[src]
fn clone(&self) -> Intersection<'a, T>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl<'a, T: Ord + Clone> SetOperation<&'a T, T> for Intersection<'a, T>
[src]
impl<'a, T: Ord + Clone> SetOperation<&'a T, T> for Intersection<'a, T>
fn extend_vec(self, output: &mut Vec<T>)
[src]
fn extend_vec(self, output: &mut Vec<T>)
fn into_set_buf(self) -> SetBuf<U>
[src]
fn into_set_buf(self) -> SetBuf<U>
Create a SetBuf
using the SetOperation::extend_vec
method.
impl<'a, T: Ord> SetOperation<&'a T, &'a T> for Intersection<'a, T>
[src]
impl<'a, T: Ord> SetOperation<&'a T, &'a T> for Intersection<'a, T>
fn extend_vec(self, output: &mut Vec<&'a T>)
[src]
fn extend_vec(self, output: &mut Vec<&'a T>)
fn into_set_buf(self) -> SetBuf<U>
[src]
fn into_set_buf(self) -> SetBuf<U>
Create a SetBuf
using the SetOperation::extend_vec
method.
Auto Trait Implementations
impl<'a, T> Send for Intersection<'a, T> where
T: Sync,
impl<'a, T> Send for Intersection<'a, T> where
T: Sync,
impl<'a, T> Sync for Intersection<'a, T> where
T: Sync,
impl<'a, T> Sync for Intersection<'a, T> where
T: Sync,