Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[prototype] Map key redesign #51

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

[prototype] Map key redesign #51

wants to merge 3 commits into from

Conversation

uint
Copy link
Collaborator

@uint uint commented Jul 9, 2024

Closes #48

This whole monstrosity:

  • enables bounded iteration for maps, but only if there's no length-prefixing of the key going on
  • only length-prefixes keys when the key is dynamically sized AND it's not the final "component" of the complete key (as stored in the backend)
  • implements numerical keys for maps

TODO:

  • simplify, rearrange, rename things, make everything easier to understand for future maintainers
  • internal documentation
  • review what should be public
  • API reference
  • complete tests
  • check if Key/OwnedKey implementors can receive something like &[u8; 4] when they specify their key as having 4 bytes, and &[u8] when they specify the key as dynamically sized - less custom error handling needed that way
  • look for other std types to implement OwnedKey/Key for
  • can this kind of stuff help make key types we get from iteration a little less crazy?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Integer key types for Map
1 participant