Go to file
Stjepan Glavina 095b9b5a6c Update README.md 2017-10-25 21:15:33 +02:00
examples Don't specify capacity in splay tree 2016-12-20 18:49:45 +01:00
src Implement shrink_to_fit method on Arena (#8) 2017-08-11 22:38:21 +02:00
.gitignore Rough initial design 2016-10-23 14:58:49 +02:00
.travis.yml Add Travis config 2016-10-25 17:54:37 +02:00
Cargo.toml Bump the version to 0.4.2 2017-08-11 22:39:52 +02:00
LICENSE-APACHE Change to dual Apache-2.0/MIT 2016-10-25 18:54:42 +02:00
LICENSE-MIT Change to dual Apache-2.0/MIT 2016-10-25 18:54:42 +02:00
README.md Update README.md 2017-10-25 21:15:33 +02:00

README.md

vec-arena (deprecated)

Build Status License Cargo Documentation

This crate is now deprecated in favor of slab.

What is this?

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:

  1. Use unsafe code to escape Rust's ownership rules.
  2. Wrap every object in Rc<RefCell<T>>.
  3. Use Vec<T> to store objects, then access them using indices.

If the last option seems most appealing to you, perhaps Arena<T> is for you. It will provide a more convenient API than a plain Vec<T>.

Examples

Some data structures built using Arena<T>: