Add basic dictionary impl by lilizoey · Pull Request #92 · godot-rust/gdext (original) (raw)
This is OK for now, but might later be removed, once we have full iterator support.
Reason: maps and sets are different data structures, so I'm not sure if a direct From/TryFrom
conversion is the right approach. For example, there is no such conversion between HashMap
and HashSet
in the standard library.
Instead, we can add iterators over key-value pairs, keys and values. It should then be relatively simple to collect()
them into their respective data structures, and we can make this API more versatile and agnostic of concrete types like HashSet
.