Add solution for serializing/deserializing World as part of a larger type
未关闭
- 主要语言
- Rust
- 星标
- 1.7k
- 派生
- 140
- PR 合并指标
- 30 天内没有已合并 PR
描述
At the moment, the only way to deserialize a `World` is through `Registry::as_deserialize(_into_world)`. There are no types that implement `Deserialize`, which means it's not possible to include a world in a larger struct and implement `Deserialize` on that. It's possible with a custom `#[serde(deserialize_with = "path")]` on the struct, but that just shifts the problem.
I realise that part of the issue is how to pass the target `World` in, since Serde doesn't allow you to pass information in from the outside. That could perhaps be solved using the `scoped-tls-hkt` crate, or a custom solution like what is used for `Entity` deserialization.
贡献指南
这个仓库没有索引到贡献指南
评估
这个 Issue 还没有评估数据。