slotmap
slotmap copied to clipboard
Slotmap data structure for Rust
Iterators very explicitly say, that the visit key-value pairs "in arbitrary order". Is this "arbitrary order" consistent between a `SlotMap `and its dependent `SecondaryMap`s, so they can be joined (assuming...
(Linked list example: https://github.com/orlp/slotmap/blob/master/examples/doubly_linked_list.rs ) In `pop_head()` and `pop_tail()` functions, there are no appropriate handling of new head/tail nodes, producing dangling pointer in them. We can just call remove() funtion...
Would it be reasonable to add an API that allows this? ```rust fn update_players(world: &mut World, players: &mut SlotMap) { let mut entries = players.entries(); while let Some(entry) = entries.next_entry()...
In the case of a complex changing graph, a tracing-based GC may be useful. If I want to do mark-and-sweep GC to a slot map, I can use another container...
Such as ```rust new_key_type! { pub struct NodeKey; } ```
Right now `slotmap` only offers a zero-cost abstraction for what are essentially safe `Copy`able weak pointers as an interface. This gives control (but also the burden) of lifetimes back to...
Hi. I have an application where I want to mix up some IDs. I plan to do this by having two slotmaps, which allow me to map IDs (slotmap keys)...
`Result` can be matched to produce an infallible and safe unwrap function.
I'm not seeing any real reason for (for example) [HopSlotMap](https://github.com/orlp/slotmap/blob/c905b6ced490551476cb7c37778eb8128bdea7ba/src/hop.rs#L148) to have a `Key` bound on the generic `K`. This is against the general Rust style guide as it leads...
`DenseSlotMap` is already documented to store all values contiguously, so an `AsRef` and `AsMut` impl could be added to it to allow the user to actually access that contiguous storage....