Crates.io | obj-pool |
lib.rs | obj-pool |
version | 0.5.1 |
source | src |
created_at | 2018-08-17 23:10:37.781935 |
updated_at | 2022-10-07 08:58:58.242914 |
description | A simple object arena |
homepage | |
repository | https://github.com/artemshein/obj-pool |
max_upload_size | |
id | 80010 |
size | 56,439 |
A simple object arena.
You want to build a doubly linked list? Or maybe a bidirectional tree? Perhaps an even more complicated object graph?
Managing ownership and lifetimes might be tough then. Your options boil down to:
Rc<RefCell<T>>
.Vec<T>
to store objects, then access them using indices.If the last option seems most appealing to you, perhaps ObjPool<T>
is for you.
It will provide a more convenient API than a plain Vec<T>
.
Some data structures built using ObjPool<T>
: