Drain

Struct Drain 

Source
pub struct Drain<'a, K, A = Global>
where A: Allocator,
{ /* private fields */ }
Expand description

A draining iterator over the items of a HashSet.

This struct is created by the drain method on HashSet. See its documentation for more.

Auto Trait Implementations§

§

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

§

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

§

impl<'a, K, A> Send for Drain<'a, K, A>
where A: Send, K: Send,

§

impl<'a, K, A> Sync for Drain<'a, K, A>
where A: Sync, K: Sync,

§

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

§

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

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<I> IntoIterator for I
where I: Iterator,

Source§

type Item = <I as Iterator>::Item

The type of the elements being iterated over.
Source§

type IntoIter = I

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> I

Creates an iterator from a value. Read more
Source§

impl<I> IteratorExt for I
where I: Iterator,

Source§

fn try_collect<B>(self) -> Result<B, Error>
where Self: Sized, B: TryFromIteratorIn<Self::Item, Global>,

Transforms an iterator into a collection using fallible allocations.
Source§

fn try_collect_in<B, A>(self, alloc: A) -> Result<B, Error>
where Self: Sized, B: TryFromIteratorIn<Self::Item, A>, A: Allocator,

Transforms an iterator into a collection using fallible allocations.
Source§

fn try_join<J, S>(self, sep: S) -> Result<J, Error>
where Self: Sized, J: TryJoin<S, Self::Item, Global>,

Try to join the given value. Read more
Source§

fn try_join_in<J, S, A>(self, sep: S, alloc: A) -> Result<J, Error>
where Self: Sized, J: TryJoin<S, Self::Item, A>, A: Allocator,

Try to join the given value.
Source§

fn try_cloned<'a, T>(self) -> TryCloned<Self>
where Self: Sized + Iterator<Item = &'a T>, T: 'a + TryClone,

Creates an iterator which try_clones all of its elements. Read more
Source§

impl<I> IteratorRandom for I
where I: Iterator,

Source§

fn choose<R>(self, rng: &mut R) -> Option<Self::Item>
where R: Rng + ?Sized,

Uniformly sample one element Read more
Source§

fn choose_stable<R>(self, rng: &mut R) -> Option<Self::Item>
where R: Rng + ?Sized,

Uniformly sample one element (stable) Read more
Source§

fn choose_multiple_fill<R>(self, rng: &mut R, buf: &mut [Self::Item]) -> usize
where R: Rng + ?Sized,

Uniformly sample amount distinct elements into a buffer Read more
Source§

fn choose_multiple<R>(self, rng: &mut R, amount: usize) -> Vec<Self::Item>
where R: Rng + ?Sized,

Uniformly sample amount distinct elements into a Vec Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,