Method lrs::vec::Vec::push

Appends an element to the vector.

Syntax

impl<T, H> Vec<T, H>
    where H: Allocator,
{
    fn push(&mut self, val: T) -> ()
}

Arguments

NameDescription
val

The element to append.

Remarks

This method aborts the process if no memory is available and allocating additional memory fails. To avoid this, use reserve or try_push.