Lines Matching defs:Drain
21 /// let iter: std::vec::Drain<'_, _> = v.drain(..);
24 pub struct Drain<
39 impl<T: fmt::Debug, A: Allocator> fmt::Debug for Drain<'_, T, A> {
41 f.debug_tuple("Drain").field(&self.iter.as_slice()).finish()
45 impl<'a, T, A: Allocator> Drain<'a, T, A> {
142 impl<'a, T, A: Allocator> AsRef<[T]> for Drain<'a, T, A> {
149 unsafe impl<T: Sync, A: Sync + Allocator> Sync for Drain<'_, T, A> {}
151 unsafe impl<T: Send, A: Send + Allocator> Send for Drain<'_, T, A> {}
154 impl<T, A: Allocator> Iterator for Drain<'_, T, A> {
168 impl<T, A: Allocator> DoubleEndedIterator for Drain<'_, T, A> {
176 impl<T, A: Allocator> Drop for Drain<'_, T, A> {
178 /// Moves back the un-`Drain`ed elements to restore the original `Vec`.
179 struct DropGuard<'r, 'a, T, A: Allocator>(&'r mut Drain<'a, T, A>);
245 impl<T, A: Allocator> ExactSizeIterator for Drain<'_, T, A> {
252 unsafe impl<T, A: Allocator> TrustedLen for Drain<'_, T, A> {}
255 impl<T, A: Allocator> FusedIterator for Drain<'_, T, A> {}