Struct ExtractIf

#[must_use = "iterators are lazy and do nothing unless consumed; use `retain` or `extract_if().for_each(drop)` to remove and discard elements"]
pub struct ExtractIf<'a, T, R, F, A: Allocator + Clone = Global> { pub(in ::collections::btree::set) pred: F, pub(in ::collections::btree::set) inner: ExtractIfInner<'a, T, SetValZST, R>, pub(in ::collections::btree::set) alloc: A }

This struct is created by the extract_if method on BTreeSet.

Fields

pred: F
inner: ExtractIfInner<'a, T, SetValZST, R>
alloc: A

The BTreeMap will outlive this IntoIter so we don't care about drop order for alloc.

Trait Implementations

impl<T, R, F, A> Debug for ExtractIf<'_, T, R, F, A> where T: Debug, A: Allocator + Clone,

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

impl<T, R, F, A: Allocator + Clone> FusedIterator for ExtractIf<'_, T, R, F, A> where T: PartialOrd, R: RangeBounds<T>, F: FnMut(&T) -> bool,

impl<T, R, F, A: Allocator + Clone> Iterator for ExtractIf<'_, T, R, F, A> where T: PartialOrd, R: RangeBounds<T>, F: FnMut(&T) -> bool,

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

Auto Trait Implementations

impl<'a, T, R, F, A = Global> !UnwindSafe for ExtractIf<'a, T, R, F, A>

impl<'a, T, R, F, A> Freeze for ExtractIf<'a, T, R, F, A> where F: Freeze, ExtractIfInner<'a, T, SetValZST, R>: Freeze, A: Freeze,

impl<'a, T, R, F, A> RefUnwindSafe for ExtractIf<'a, T, R, F, A> where F: RefUnwindSafe, ExtractIfInner<'a, T, SetValZST, R>: RefUnwindSafe, A: RefUnwindSafe,

impl<'a, T, R, F, A> Send for ExtractIf<'a, T, R, F, A> where F: Send, ExtractIfInner<'a, T, SetValZST, R>: Send, A: Send,

impl<'a, T, R, F, A> Sync for ExtractIf<'a, T, R, F, A> where F: Sync, ExtractIfInner<'a, T, SetValZST, R>: Sync, A: Sync,

impl<'a, T, R, F, A> Unpin for ExtractIf<'a, T, R, F, A> where F: Unpin, ExtractIfInner<'a, T, SetValZST, R>: Unpin, A: Unpin,

impl<'a, T, R, F, A> UnsafeUnpin for ExtractIf<'a, T, R, F, A> where F: UnsafeUnpin, ExtractIfInner<'a, T, SetValZST, R>: UnsafeUnpin, A: UnsafeUnpin,

Blanket Implementations

impl<I> IntoIterator for ExtractIf<'a, T, R, F, A> where I: Iterator,

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

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

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for ExtractIf<'a, T, R, F, A> where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for ExtractIf<'a, T, R, F, A> where T: ?Sized,

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

impl<T> From<T> for ExtractIf<'a, T, R, F, A>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> SizeHint for ExtractIf<'a, T, R, F, A> where T: ?Sized,

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

impl<T> SizedTypeProperties for ExtractIf<'a, T, R, F, A>

impl<T, U> Into<U> for ExtractIf<'a, T, R, F, 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 ExtractIf<'a, T, R, F, 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 ExtractIf<'a, T, R, F, A> where U: TryFrom<T>,

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