An object pool that guarantees pinning of its items and enables easy item access via unsafe code by not maintaining any Rust references to its items.
use PinnedPool;
let mut pool = new;
// Inserting an item gives you a key that you can later use to look up the item again.
let alice_key = pool.insert;
let bob_key = pool.insert;
let charlie_key = pool.insert;
// Retrieving items from a pool is fast, similar to `Vec[key]`.
let alice = pool.get;
println!;
pool.remove;
pool.remove;
// You can also modify the items in-place.
let mut alice = pool.get_mut;
alice.push_str;
println!;
More details in the package documentation.
This is part of the Folo project that provides mechanisms for high-performance hardware-aware programming in Rust.