Crate reusable_id_pool

Source
Expand description

A pool for RAII IDs.

§Example

use reusable_id_pool::ReusableIdPool;

let reusable_id_pool = ReusableIdPool::new();
let id = reusable_id_pool.allocate();

// Do something with the `id`, like move it into a struct. It will be
// returned to the pool when it is dropped.

Structs§

ArcId
An RAII reference to an ID.
ReusableIdPool
A std-only ID pool that hands out ArcIds.
ReusableIdPoolManual
An ID pool that hands out u64s.

Enums§

ReusableIdPoolError
The error type for reusable ID pool operations.