Method lrs::vec::Vec::with_capacity

Creates a new allocating vector and reserves a certain amount of space for it.

Syntax

impl<T, H> Vec<T, H>
    where H: Allocator,
{
    fn with_capacity(cap: usize) -> Result<Vec<T, H>, Errno>
        where <H as Allocator>::Pool: Default,
}

Arguments

NameDescription
cap