Struct Drain

struct Drain<'a, T: 'a, A: Allocator = crate::alloc::Global> { ... }

A draining iterator over the elements of a BinaryHeap.

This struct is created by [BinaryHeap::drain()]. See its documentation for more.

Implementations

impl<T, A: Allocator> Drain<'_, T, A>

fn allocator(self: &Self) -> &A

Returns a reference to the underlying allocator.

impl<'a, T, A> Freeze for Drain<'a, T, A>

impl<'a, T, A> RefUnwindSafe for Drain<'a, T, A>

impl<'a, T, A> Send for Drain<'a, T, A>

impl<'a, T, A> Sync for Drain<'a, T, A>

impl<'a, T, A> Unpin for Drain<'a, T, A>

impl<'a, T, A> UnwindSafe for Drain<'a, T, A>

impl<'a, T: $crate::fmt::Debug + 'a, A: $crate::fmt::Debug + Allocator> Debug for Drain<'a, T, A>

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

impl<I> IntoIterator for Drain<'a, T, A>

fn into_iter(self: Self) -> I

impl<T> Any for Drain<'a, T, A>

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for Drain<'a, T, A>

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for Drain<'a, T, A>

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

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

fn from(t: T) -> T

Returns the argument unchanged.

impl<T, A: Allocator> DoubleEndedIterator for Drain<'_, T, A>

fn next_back(self: &mut Self) -> Option<T>

impl<T, A: Allocator> ExactSizeIterator for Drain<'_, T, A>

fn is_empty(self: &Self) -> bool

impl<T, A: Allocator> FusedIterator for Drain<'_, T, A>

impl<T, A: Allocator> Iterator for Drain<'_, T, A>

fn next(self: &mut Self) -> Option<T>
fn size_hint(self: &Self) -> (usize, Option<usize>)

impl<T, U> Into for Drain<'a, T, A>

fn into(self: 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 for Drain<'a, T, A>

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

impl<T, U> TryInto for Drain<'a, T, A>

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