Trait legion::serialize::CustomEntitySerializer [−][src]
Describes a mapping between a runtime Entity
ID and a serialized equivalent.
Implementing this trait will automatically implement EntitySerializer
for the type.
Developers should be aware of their serialization/deserialization use-cases as well as
world-merge use cases when picking a SerializedID
, as this type must identify unique entities
across world serialization/deserialization cycles as well as across world merges.
Associated Types
type SerializedID: Serialize + for<'a> Deserialize<'a>
[src]
The type used for serialized Entity IDs.
Required methods
fn to_serialized(&self, entity: Entity) -> Self::SerializedID
[src]
Constructs the serializable representation of Entity
fn from_serialized(&self, serialized: Self::SerializedID) -> Entity
[src]
Convert a SerializedEntity
to an Entity
.