Proposal: "late" fields on tracked structs #581
Labels
bikeshed 🚴♀️
Debating API details and the like
rfc
Active discussion about a possible future feature
Milestone
TL;DR
Permit fields to be tagged as "late"
When you create a tracked struct, you specify only the early fields:
but you can later specify the late fields, so long as it is within the same tracked function (query):
Panics occur if:
v.ty(db)
but it has not yet been setty
Background
Salsa currently supports a rather obscure feature called "specified" functions that lets you emulate this:
This lets you specify the value of
ty
for somev
so long asv
was created in the current query (andty
has not yet been called ons
):Supporting the late pattern directly would
The text was updated successfully, but these errors were encountered: