trait SpecInPlaceCollect<T, I>: Iterator<Item = T> {
    // Required method
    unsafe fn collect_in_place(&mut self, dst: *mut T, end: *const T) -> usize;
}
Expand description

Helper trait to hold specialized implementations of the in-place iterate-collect loop

Required Methods§

source

unsafe fn collect_in_place(&mut self, dst: *mut T, end: *const T) -> usize

Collects an iterator (self) into the destination buffer (dst) and returns the number of items collected. end is the last writable element of the allocation and used for bounds checks.

This method is specialized and one of its implementations makes use of Iterator::__iterator_get_unchecked calls with a TrustedRandomAccessNoCoerce bound on I which means the caller of this method must take the safety conditions of that trait into consideration.

Implementors§

source§

impl<T, I> SpecInPlaceCollect<T, I> for Iwhere I: Iterator<Item = T> + TrustedRandomAccessNoCoerce,

source§

impl<T, I> SpecInPlaceCollect<T, I> for Iwhere I: Iterator<Item = T>,