[−][src]Struct sdset::duo::Union
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]
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: 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]
Create a SetBuf
using the SetOperation::extend_vec
method.
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]
Create a SetBuf
using the SetOperation::extend_vec
method.
impl<'a, T: Clone + 'a> Clone for Union<'a, T>
[src]
fn clone(&self) -> Union<'a, T>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<'a, T: Copy + 'a> Copy for Union<'a, T>
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)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> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,