slotmap
slotmap copied to clipboard
Slotmap data structure for Rust
Closes #55 I wasn't sure about the name. `remove_stale_entry` maybe makes it seem like this is a cleanup function you are *supposed* to call. I considered `extract_stale_entry`. I'm also not...
I'm opening this PR not because it's the final proposal, but I wanted to start a discussion at least. I have some performance sensitive code that currently takes a slice...
I have a slotmap like `` and now I'd like to make ``, without changing the keys. Is there some way I can do this? I couldn't figure it out....
`DenseSlotMap` can shrink the data and keys vectors, so supporting `shrink_to_fit` makes sense.
Slotmap is often used to model graph relations. If you wish to query both incoming and outgoing relations it's quite common to have ```rust let mut a_to_b: SecondaryMap; let mut...
A low priority issue, but I think the library would be improved by a larger set of examples. For example, what if we wanted to use [slotmap to manage a...
Before: ``` [examples/debug.rs:10] &x = SlotMap { slots: [ Slot { version: 0, next_free: 0, }, Slot { version: 1, value: "a", }, Slot { version: 1, value: "b", },...
Currently `Debug` output is does by `Derivie`ing. This prints something like ``` SlotMap { slots: [ Slot { version: 0, next_free: 0, }, ], free_head: 1, num_elems: 0, _k: PhantomData,...
Would this be considered for inclusion? ## Iterate all shared entities that have a component in each secondary map ```rust for (entity, ((comp1, comp2), comp3)) in map1.join(&mut map2).join(&mut map3).iter() {...
First of all, thank you for maintaining the slotmap crate. I'm currently using `SlotMap` with various generic types (`VertData`, `FaceData`, `EdgeData`) to manage graph data in my application: ``` SlotMap...