Reduces the length of the vector.
impl<T, H> Vec<T, H>
where H: Allocator,
{
fn truncate(&mut self, len: usize) -> ()
}| Name | Description |
|---|---|
| len | The new length of the vector. |
If len is greater than the current length of the vector, the process is aborted.