Struct Drain

pub struct Drain<'data, T: Send> { /* private fields */ }

Draining parallel iterator that moves a range out of a vector, but keeps the total capacity.

Trait Implementations

impl<'data, T: Debug + Send> Debug for Drain<'data, T>

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

impl<'data, T: Send> Drop for Drain<'data, T>

fn drop(&mut self)

impl<'data, T: Send> IndexedParallelIterator for Drain<'data, T>

fn drive<C>(self, consumer: C) -> C::Result
where
    C: Consumer<Self::Item>,
fn len(&self) -> usize
fn with_producer<CB>(self, callback: CB) -> CB::Output
where
    CB: ProducerCallback<Self::Item>,

impl<'data, T: Send> ParallelIterator for Drain<'data, T>

type Item = T;
fn drive_unindexed<C>(self, consumer: C) -> C::Result
where
    C: UnindexedConsumer<Self::Item>,
fn opt_len(&self) -> Option<usize>

Auto Trait Implementations

impl<'data, T> !UnwindSafe for Drain<'data, T>

impl<'data, T> Freeze for Drain<'data, T> where &'data mut Vec<T>: Freeze,

impl<'data, T> RefUnwindSafe for Drain<'data, T> where &'data mut Vec<T>: RefUnwindSafe,

impl<'data, T> Send for Drain<'data, T> where &'data mut Vec<T>: Send,

impl<'data, T> Sync for Drain<'data, T> where &'data mut Vec<T>: Sync,

impl<'data, T> Unpin for Drain<'data, T> where &'data mut Vec<T>: Unpin,

impl<'data, T> UnsafeUnpin for Drain<'data, T> where &'data mut Vec<T>: UnsafeUnpin,

Blanket Implementations

impl<T> Any for Drain<'data, T> where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for Drain<'data, T> where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for Drain<'data, T> where T: ?Sized,

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

impl<T> From<T> for Drain<'data, T>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> IntoEither for Drain<'data, T>

impl<T> IntoParallelIterator for Drain<'data, T> where T: ParallelIterator,

type Iter = T;
type Item = <T as ParallelIterator>::Item;
fn into_par_iter(self) -> T

impl<T> Pointable for Drain<'data, T>

const ALIGN: usize = _;
type Init = T;
unsafe fn init(init: <T as Pointable>::Init) -> usize
unsafe fn deref<'a>(ptr: usize) -> &'a T
unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
unsafe fn drop(ptr: usize)

impl<T, U> Into<U> for Drain<'data, T> 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 Drain<'data, T> where U: Into<T>,

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

impl<T, U> TryInto<U> for Drain<'data, T> where U: TryFrom<T>,

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