SavedAsset iter_labels returning strings rather than CowArc's #11609
-
So I am trying to write a custom Asset Saver, and I need to access the Labeled sub assets given in the SavedAssets struct in order to create the final data I want to save. (I am working with Gltf Assets which load all of the useful info as Labeled Sub-Assets). The SavedAsset Struct allows you to get a Labeled Asset using its label as a CowArc<'static, str>, and it allows you to iterate over all of the Labels. The problem is that the Label iterator returns Elements of type &str, and I cant turn them back into their static CowArc equivalent, and so I have no way of accessing that data. I'm wondering what the correct way to get this data is, hopefully without rewriting the GltfLoader. The iter_labels function from SavedAssets seems to map the CowArc<'static, str> to &str before returning, and I'm confused as to why it doesn't just iterate over the CowArc's directly. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
This is likely just an oversight, made to avoid leaking implementation details that seemed irrelevant. Can you open a PR? |
Beta Was this translation helpful? Give feedback.
This is likely just an oversight, made to avoid leaking implementation details that seemed irrelevant. Can you open a PR?