Struct Difference

#[must_use = "this returns the difference as an iterator, without modifying either input set"]
pub struct Difference<'a, T: 'a, A: Allocator + Clone = Global> { pub(in ::collections::btree::set) inner: DifferenceInner<'a, T, A> }

A lazy iterator producing elements in the difference of BTreeSets.

This struct is created by the difference method on BTreeSet. See its documentation for more.

Fields

inner: DifferenceInner<'a, T, A>

Trait Implementations

impl<'a, T: Ord, A: Allocator + Clone> Iterator for Difference<'a, T, A>

type Item = &'a T;
fn next(&mut self) -> Option<&'a T>
fn size_hint(&self) -> (usize, Option<usize>)
fn min(self) -> Option<&'a T>

impl<T, A: Allocator + Clone> Clone for Difference<'_, T, A>

fn clone(&self) -> Self

impl<T: Debug, A: Allocator + Clone> Debug for Difference<'_, T, A>

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl<T: Ord, A: Allocator + Clone> FusedIterator for Difference<'_, T, A>

Auto Trait Implementations

impl<'a, T, A> Freeze for Difference<'a, T, A> where DifferenceInner<'a, T, A>: Freeze,

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

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

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

impl<'a, T, A> Unpin for Difference<'a, T, A> where DifferenceInner<'a, T, A>: Unpin,

impl<'a, T, A> UnsafeUnpin for Difference<'a, T, A> where DifferenceInner<'a, T, A>: UnsafeUnpin,

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

Blanket Implementations

impl<I> IntoIterator for Difference<'a, T, A> where I: Iterator,

type Item = <I as Iterator>::Item;
type IntoIter = I;
fn into_iter(self) -> I

impl<T> Any for Difference<'a, T, A> where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for Difference<'a, T, A> where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for Difference<'a, T, A> where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> CloneToUninit for Difference<'a, T, A> where T: Clone,

unsafe fn clone_to_uninit(&self, dest: *mut u8)

impl<T> From<T> for Difference<'a, T, A>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> SizeHint for Difference<'a, T, A> where T: ?Sized,

fn lower_bound(&self) -> usize
fn upper_bound(&self) -> Option<usize>

impl<T> SizedTypeProperties for Difference<'a, T, A>

impl<T> ToOwned for Difference<'a, T, A> where T: Clone,

type Owned = T;
fn to_owned(&self) -> T
fn clone_into(&self, target: &mut T)

impl<T, U> Into<U> for Difference<'a, T, A> where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom<U> for Difference<'a, T, A> where U: Into<T>,

type Error = Infallible;
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto<U> for Difference<'a, T, A> where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>