[−][src]Struct sdset::multi::Union
Represent the union 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]).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]
pub fn new(slices: Vec<&'a Set<T>>) -> Self
[src]
Construct one with slices checked to be sorted and deduplicated.
Trait Implementations
impl<'a, T: Ord + Clone> SetOperation<T> for Union<'a, T>
[src]
fn extend_vec(self, output: &mut Vec<T>)
[src]
fn into_set_buf(self) -> SetBuf<T>
[src]
impl<'a, T: Ord> SetOperation<&'a T> for Union<'a, T>
[src]
fn extend_vec(self, output: &mut Vec<&'a T>)
[src]
fn into_set_buf(self) -> SetBuf<T>
[src]
impl<'a, T: Clone + 'a> Clone for Union<'a, T>
[src]
Auto Trait Implementations
impl<'a, T> Send for Union<'a, T> where
T: Sync,
T: Sync,
impl<'a, T> Sync for Union<'a, T> where
T: Sync,
T: Sync,
impl<'a, T> Unpin for Union<'a, T>
impl<'a, T> UnwindSafe for Union<'a, T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<'a, T> RefUnwindSafe for Union<'a, T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,