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

VarZeroVecFormat should be convenient to use with ZeroMap #2312

Open
Manishearth opened this issue Aug 2, 2022 · 1 comment
Open

VarZeroVecFormat should be convenient to use with ZeroMap #2312

Manishearth opened this issue Aug 2, 2022 · 1 comment
Labels
C-zerovec Component: Yoke, ZeroVec, DataBake T-enhancement Type: Nice-to-have but not required
Milestone

Comments

@Manishearth
Copy link
Member

#2306 adds VarZeroVecFormat, however to use it with ZeroMap you have to manually write a ZeroMapKV implementation with a wrapper type.

We should instead add support for FormatSelector<T: VarULE, F: VZVFormat> which implements ZeroMapKV with the same pattern used for normal VarULE types.

One tricky thing is that currently ZeroMap types use &K and &V, as well as K: Ord (etc) bounds, those would all need to be switched over to K::SelfType or something. This will make the APIs more confusing but we can document SelfType as being Self 99% of the time; so it might be fine.

@Manishearth Manishearth added the T-enhancement Type: Nice-to-have but not required label Aug 2, 2022
@Manishearth Manishearth added this to the Utilities 1.0 milestone Aug 2, 2022
@Manishearth
Copy link
Member Author

We should also make this configurable in the proc macro around MultiFieldsULE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-zerovec Component: Yoke, ZeroVec, DataBake T-enhancement Type: Nice-to-have but not required
Projects
None yet
Development

No branches or pull requests

2 participants