pscheidl / enum-collections Goto Github PK
View Code? Open in Web Editor NEWEnumMap for Rust.
License: Apache License 2.0
EnumMap for Rust.
License: Apache License 2.0
In the standard library, indexing panics when the index isn't found. Indexing EntityMap
returns a reference to an option instead.
Since the underlying arrays are the same size (not growing at runtime) and key indices are always the same, values must be compared. Therefore, Eq
shouldn't be required to be implemented for the enum (the keys) itself.
Instead of performing a heap allocation, the backing array could be stored inline, avoiding a layer of indirection. Users for who
want the indirection can simply wrap the map/table in a Box
. This provides a more composable API.
Unfortunately I'm not sure if this is possible before const_generics_expr
gets stabilized.
Currently, benchmarks must be manually triggered. Find a way to run benchmarks in CI, ensuring resources allocation is the same (if possible).
Though we can build a new wrapper for EnumTable/EnumMap when using it, it's better if you could impl it in this crate :)
Or simply provide an interface Into<HashMap>
, it would be helpful for debug/serialization.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.