Trait alloc::vec::in_place_collect::SpecInPlaceCollect
source · 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§
sourceunsafe fn collect_in_place(&mut self, dst: *mut T, end: *const T) -> usize
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.