pub(crate) unsafe trait AsVecIntoIter {
    type Item;

    // Required method
    fn as_into_iter(&mut self) -> &mut IntoIter<Self::Item> ;
}
Expand description

Internal helper trait for in-place iteration specialization.

Currently this is only implemented by vec::IntoIter - returning a reference to itself - and binary_heap::IntoIter which returns a reference to its inner representation.

Since this is an internal trait it hides the implementation detail binary_heap::IntoIter uses vec::IntoIter internally.

Safety

In-place iteration relies on implementation details of vec::IntoIter, most importantly that it does not create references to the whole allocation during iteration, only raw pointers

Required Associated Types§

Required Methods§

source

fn as_into_iter(&mut self) -> &mut IntoIter<Self::Item>

Implementors§

source§

impl<I> AsVecIntoIter for alloc::collections::binary_heap::IntoIter<I>

§

type Item = I

source§

impl<T> AsVecIntoIter for alloc::vec::into_iter::IntoIter<T>

§

type Item = T