handy: handles and handle maps.

Docs CircleCI codecov

handy provides handles and handle maps for rust code. This is a fairly useful data structure for rust code, since it can help you work around borrow checker issues.

Essentially, Handle and HandleMap are a more robust version of the pattern where instead of storing a reference to a &T directly, you instead store a usize which indicates where it is in some Vec. I claim they're more robust because:

Similar crates

There are a whole bunch.

License

TLDR: MIT / Apache2 like every other Rust library.

This code shares common legacy with the Handle/HandleMap types from https://crates.io/crates/ffi-support (After all, I wrote that library too). I also stole the test code more or less directly from that crate. Because of that, this library has the exact same license, down to the copyright assignment to Mozilla.

In practice that doesn't matter, since who cares, they're both MIT / Apache2, but I figured I should write it down somewhere.