Appends an element to the vector.
impl<T, H> Vec<T, H>
where H: Allocator,
{
fn push(&mut self, val: T) -> ()
}| Name | Description |
|---|---|
| val | The element to append. |
This method aborts the process if no memory is available and allocating additional memory fails. To avoid this, use reserve or try_push.