Library guide · API index and notation
This page is generated from the bundled library in this checkout. Signatures and adjacent source comments are reproduced below; the linked guide explains usage, storage, failures, and platform support.
import "alloc/pool_box"
Names used in signatures
Unqualified names denote this package’s types (including other source files in the same package), language built-ins, or generic parameters such as T. Qualified names use the import aliases below. These aliases belong to the library source; import a dependency yourself to use its alias in your program.
| Alias | Package | Source file |
|---|---|---|
boxed |
alloc/boxed |
pool_box.dodo |
error |
alloc/error |
pool_box.dodo |
pool |
alloc/pool |
pool_box.dodo |
new
Function · Source
Own a value in a caller-backed pool block. The returned Box exclusively borrows its allocator until extraction or destruction. T cannot carry checked borrows or contain Results. Allocation failure destroys value normally.
pub fn new<T>(allocator: &mut pool.Pool, value: T) -> boxed.Box<T, pool.Pool>!error.AllocError from(allocator)