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.
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 ourCollection
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.