25 added support for editing Resources, but in doing so added the requirement that registered Resource types be DeserializeOwned. While most Resources types will likely be able to #[derive(Deserialize)], it would be good to still support displaying Resources that only implement Serialize.
To do so, we should add a new method SyncEditorBundle::read_resource for registering a read-only Resource, as well as a corresponding SyncEditorBundle::read_resources method for registering a set of read-only resources generated with type_set!.
To do this, we'll likely have to split the ResourceSet trait into two traits ReadResourceSet and WriteResourceSet. ReadResourceSet would only need to enforce the Serialize bound, and WriteResourceSet would only need to enforce the DeserializeOwned bound.
25 added support for editing
Resource
s, but in doing so added the requirement that registeredResource
types beDeserializeOwned
. While most Resources types will likely be able to#[derive(Deserialize)]
, it would be good to still support displaying Resources that only implementSerialize
.To do so, we should add a new method
SyncEditorBundle::read_resource
for registering a read-onlyResource
, as well as a correspondingSyncEditorBundle::read_resources
method for registering a set of read-only resources generated withtype_set!
.To do this, we'll likely have to split the
ResourceSet
trait into two traitsReadResourceSet
andWriteResourceSet
.ReadResourceSet
would only need to enforce theSerialize
bound, andWriteResourceSet
would only need to enforce theDeserializeOwned
bound.