Skip to content

CollectionDocument should support borrowing #298

Description

@ecton

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    collectionsIssues impacting collections or viewsenhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions