Struct IntoIter

pub struct IntoIter<K, V, A: Allocator + Clone = Global> { pub(in ::collections::btree::map) range: LazyLeafRange<Dying, K, V>, pub(in ::collections::btree::map) length: usize, pub(in ::collections::btree::map) alloc: A }

An owning iterator over the entries of a BTreeMap, sorted by key.

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

Fields

range: LazyLeafRange<Dying, K, V>
length: usize
alloc: A

The BTreeMap will outlive this IntoIter so we don't care about drop order for alloc.

Implementations

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

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

Returns an iterator of references over the remaining items.

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

fn dying_next(&mut self) -> Option<Handle<NodeRef<Dying, K, V, LeafOrInternal>, KV>>

Core of a next method returning a dying KV handle, invalidated by further calls to this function and some others.

fn dying_next_back(&mut self) -> Option<Handle<NodeRef<Dying, K, V, LeafOrInternal>, KV>>

Core of a next_back method returning a dying KV handle, invalidated by further calls to this function and some others.

Trait Implementations

impl<K, V, A> Default for IntoIter<K, V, A> where A: Allocator + Default + Clone,

fn default() -> Self

Creates an empty btree_map::IntoIter.

# use std::collections::btree_map;
let iter: btree_map::IntoIter<u8, u8> = Default::default();
assert_eq!(iter.len(), 0);

impl<K, V, A: Allocator + Clone> DoubleEndedIterator for IntoIter<K, V, A>

fn next_back(&mut self) -> Option<(K, V)>

impl<K, V, A: Allocator + Clone> Drop for IntoIter<K, V, A>

fn drop(&mut self)

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

fn len(&self) -> usize

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

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

type Item = (K, V);
fn next(&mut self) -> Option<(K, V)>
fn size_hint(&self) -> (usize, Option<usize>)

impl<K, V, A: Allocator + Clone> TrustedLen for IntoIter<K, V, A>

impl<K: Debug, V: Debug, A: Allocator + Clone> 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 LazyLeafRange<Dying, K, V>: Freeze, A: Freeze,

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

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

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

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

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

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

Blanket Implementations

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

type Item = <I as Iterator>::Item;
type IntoIter = I;
fn into_iter(self) -> I

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

fn type_id(&self) -> TypeId

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

fn borrow(&self) -> &T

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

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

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

fn from(t: T) -> T

Returns the argument unchanged.

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

fn lower_bound(&self) -> usize
fn upper_bound(&self) -> Option<usize>

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

impl<T, U> Into<U> for IntoIter<K, V, A> 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 IntoIter<K, V, A> where U: Into<T>,

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

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

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