Take all elements from this list and return them as a new list. Leave this list empty. This is the equivalent of `Option::take()`.
(&mut self)
| 381 | /// |
| 382 | /// This is the equivalent of `Option::take()`. |
| 383 | pub fn take(&mut self) -> Self { |
| 384 | mem::replace(self, Default::default()) |
| 385 | } |
| 386 | |
| 387 | /// Appends an element to the back of the list. |
| 388 | /// Returns the index where the element was inserted. |