Struct mempool::Pool
[−]
[src]
pub struct Pool<T: Send> { // some fields omitted }
A fast memory pool.
Methods
impl<T: Send> Pool<T>
fn new(create: CreateFn<T>) -> Pool<T>
Create a new memory pool with the given initialization function.
fn get(&self) -> &T
Get a reference to a new value from the pool. The underlying value may
be reused in subsequent calls to get
.
If one does not exist, then it is created with the initialization function.