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

CollectionDocument should support borrowing #298

Open
ecton opened this issue May 9, 2023 · 0 comments
Open

CollectionDocument should support borrowing #298

ecton opened this issue May 9, 2023 · 0 comments
Labels
collections Issues impacting collections or views enhancement New feature or request help wanted Extra attention is needed
Milestone

Comments

@ecton
Copy link
Member

ecton commented May 9, 2023

After #284, the next location to investigate is allowing SerializedCollection to have a generic associated lifetime that CollectionDocument can utilize during the map/reduce workflows. The goal would be to allow for borrowing things like string slices from the original document data, when possible.

This causes other lifetime issues, specifically for taking a lifetime-annotated type and converting it to a 'static lifetime. This will likely need a new trait, because ToOwned introduces the Borrow restriction on its associated type. This also means that we will need another derive or add support for deriving this other trait in our Collection derive.

I've attempted tackling this a few times, but this is a very gnarly problem. I think it's doable, but I'm no longer targeting it for v0.5.

@ecton ecton added enhancement New feature or request help wanted Extra attention is needed collections Issues impacting collections or views labels May 9, 2023
@ecton ecton added this to the v1.0 milestone May 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
collections Issues impacting collections or views enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant