| Crates.io | sparse-slot |
| lib.rs | sparse-slot |
| version | 0.0.4 |
| created_at | 2024-11-12 20:16:11.232546+00 |
| updated_at | 2025-01-18 11:55:43.935195+00 |
| description | minimal sparse slot (sparse vector) |
| homepage | |
| repository | https://github.com/piot/sparse-slot |
| max_upload_size | |
| id | 1445484 |
| size | 22,458 |
A lightning-fast, memory-efficient sparse slot map implementation in Rust.
Add this to your Cargo.toml:
[dependencies]
sparse-slot = "0.0.3"
Here's a quick example to get you started:
use sparse_slot::SparseSlot;
fn main() {
let mut slot = SparseSlot::new(5);
let id = slot.try_set("Hello, world!").expect("failed to set");
println!("Stored value: {:?}", slot.get(id));
}
This project is open source with a single copyright holder (that's me!). While the code is publicly available under the MIT License, I'm not accepting external contributions at this time.
If you have suggestions or stumble upon bugs, please open an issue for discussion. While I can't accept pull requests, your feedback is invaluable and helps make the project better.
Thank you for your understanding and interest in this project! Your engagement means the world to me. 🙏
This project is licensed under the MIT License - see the LICENSE file for details.
Copyright (c) 2024 Peter Bjorklund. All rights reserved.