A small question about boxing and futures

In the case of async traits wherein you must return a Box'ed future, does this necessarily imply that all the data in that function will be boxed, including references?

If it needs to be boxed, all data that lives across await points gets stored in a box.

1 Like

Yes, if the reference needs to be kept around, it too will be in the box.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.