Struct IntoIter

pub struct IntoIter<K, V, A: Allocator = Global> { pub(in ::collections::hash::map) base: IntoIter<K, V, A> }

An owning iterator over the entries of a HashMap.

This struct is created by the into_iter method on HashMap (provided by the IntoIterator trait). See its documentation for more.

Example

use std::collections::HashMap;

let map = HashMap::from([
    ("a", 1),
]);
let iter = map.into_iter();

Fields

base: IntoIter<K, V, A>

Implementations

impl<K, V, A: Allocator> IntoIter<K, V, A>

fn iter(&self) -> Iter<'_, K, V>

Returns an iterator of references over the remaining items.

Trait Implementations

impl<K, V> Default for IntoIter<K, V>

fn default() -> Self

impl<K, V, A: Allocator> ExactSizeIterator for IntoIter<K, V, A>

fn len(&self) -> usize

impl<K, V, A: Allocator> FusedIterator for IntoIter<K, V, A>

impl<K, V, A: Allocator> Iterator for IntoIter<K, V, A>

type Item = (K, V);
fn next(&mut self) -> Option<(K, V)>
fn size_hint(&self) -> (usize, Option<usize>)
fn count(self) -> usize
fn fold<B, F>(self, init: B, f: F) -> B
where
    Self: Sized,
    F: FnMut(B, Self::Item) -> B,

impl<K: Debug, V: Debug, A: Allocator> Debug for IntoIter<K, V, A>

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

Auto Trait Implementations

impl<K, V, A> Freeze for IntoIter<K, V, A> where IntoIter<K, V, A>: Freeze,

impl<K, V, A> RefUnwindSafe for IntoIter<K, V, A> where IntoIter<K, V, A>: RefUnwindSafe,

impl<K, V, A> Send for IntoIter<K, V, A> where IntoIter<K, V, A>: Send,

impl<K, V, A> Sync for IntoIter<K, V, A> where IntoIter<K, V, A>: Sync,

impl<K, V, A> Unpin for IntoIter<K, V, A> where IntoIter<K, V, A>: Unpin,

impl<K, V, A> UnsafeUnpin for IntoIter<K, V, A> where IntoIter<K, V, A>: UnsafeUnpin,

impl<K, V, A> UnwindSafe for IntoIter<K, V, A> where IntoIter<K, V, A>: UnwindSafe,

Blanket Implementations

impl<I> IntoIterator for IntoIter<K, V, A> where I: Iterator,

impl<T> Any for IntoIter<K, V, A> where T: 'static + ?Sized,

impl<T> Borrow<T> for IntoIter<K, V, A> where T: ?Sized,

impl<T> BorrowMut<T> for IntoIter<K, V, A> where T: ?Sized,

impl<T> From<T> for IntoIter<K, V, A>

impl<T> SizeHint for IntoIter<K, V, A> where T: ?Sized,

impl<T> SizedTypeProperties for IntoIter<K, V, A>

impl<T, U> Into<U> for IntoIter<K, V, A> where U: From<T>,

impl<T, U> TryFrom<U> for IntoIter<K, V, A> where U: Into<T>,

impl<T, U> TryInto<U> for IntoIter<K, V, A> where U: TryFrom<T>,