[][src]Struct vec_drain_where::VecDrainWhere

#[must_use]
pub struct VecDrainWhere<'a, Item: 'a, Pred> { /* fields omitted */ }

Iterator for draining a vector conditionally.

Trait Implementations

impl<'a, I: 'a, P> Drop for VecDrainWhere<'a, I, P>[src]

fn drop(&mut self)[src]

If the iterator was run to completion this will set the len to the new len after drop. I.e. it will undo the leak amplification.

If the iterator is dropped before completion this will move the remaining elements to the (single) gap (still) left from draining elements and then sets the new length.

If the iterator is dropped because the called predicate panicked the element it panicked on is leaked. This is because its simply to easy to leaf the &mut T value in a illegal state likely to panic drop or even behave unsafely (through it surly shouldn't behave this way).

impl<'a, I: 'a, P> Iterator for VecDrainWhere<'a, I, P> where
    P: FnMut(&mut I) -> bool
[src]

type Item = I

The type of the elements being iterated over.

impl<'a, Item: Debug + 'a, Pred: Debug> Debug for VecDrainWhere<'a, Item, Pred>[src]

Auto Trait Implementations

impl<'a, Item, Pred> !Send for VecDrainWhere<'a, Item, Pred>

impl<'a, Item, Pred> !Sync for VecDrainWhere<'a, Item, Pred>

impl<'a, Item, Pred> Unpin for VecDrainWhere<'a, Item, Pred> where
    Pred: Unpin

impl<'a, Item, Pred> !UnwindSafe for VecDrainWhere<'a, Item, Pred>

impl<'a, Item, Pred> RefUnwindSafe for VecDrainWhere<'a, Item, Pred> where
    Item: RefUnwindSafe,
    Pred: RefUnwindSafe

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]