| Crates.io | treentern |
| lib.rs | treentern |
| version | 0.1.1 |
| created_at | 2024-08-11 19:53:51.33779+00 |
| updated_at | 2024-08-12 10:49:27.837646+00 |
| description | An interning library that makes it easy to intern tree like types |
| homepage | |
| repository | |
| max_upload_size | |
| id | 1333607 |
| size | 7,100 |
This is an interning library.
let a = "Hello, World".intern();
let b = "Hello, World".intern();
assert_eq!(a.as_ptr(), b.as_ptr());
As compared to other implementations, this library aims to need no unsafe code.
It does this by having a separate arena for every type that implements the Intern trait.
Still, it is probably a better choice to pick another interning library (for now), as this is mostly written as a way to learn how interning works.