Crate obj_pool[−][src]
A simple object pool.
ObjPool<T> is basically just a Vec<Option<T>>, which allows you to:
- Insert an object (reuse an existing
Noneelement, or append to the end) and get anObjIdin return. - Remove object with a specified
ObjId. - Access object with a specified
ObjId.
Examples
Some data structures built using ObjPool<T>:
Structs
| ObjId |
An id of the object in an |
| ObjPool |
An object pool. |