Creates a new queue with allocated memory.
impl<T, H> Queue<T, H>
where H: Allocator,
<H as Allocator>::Pool: Default,
{
fn new(cap: usize) -> Result<Queue<T, H>, Errno>
}| Name | Description |
|---|---|
| cap | The number of elements that can be stored in the queue. |
The capacity will be increased to the next power of two.