Trait specs::saveload::DeserializeComponents
source · [−]pub trait DeserializeComponents<E, M> where
Self: Sized,
E: Display,
M: Marker, {
type Data: DeserializeOwned;
fn deserialize_entity<F>(
&mut self,
entity: Entity,
components: Self::Data,
ids: F
) -> Result<(), E>
where
F: FnMut(M) -> Option<Entity>;
fn deserialize<'a: 'b, 'b, 'de, D>(
&'b mut self,
entities: &'b EntitiesRes,
markers: &'b mut WriteStorage<'a, M>,
allocator: &'b mut M::Allocator,
deserializer: D
) -> Result<(), D::Error>
where
D: Deserializer<'de>,
{ ... }
}
Expand description
A trait which allows to deserialize entities and their components.
Required Associated Types
type Data: DeserializeOwned
type Data: DeserializeOwned
The data representation that a component group gets deserialized to.
Required Methods
Provided Methods
fn deserialize<'a: 'b, 'b, 'de, D>(
&'b mut self,
entities: &'b EntitiesRes,
markers: &'b mut WriteStorage<'a, M>,
allocator: &'b mut M::Allocator,
deserializer: D
) -> Result<(), D::Error> where
D: Deserializer<'de>,
fn deserialize<'a: 'b, 'b, 'de, D>(
&'b mut self,
entities: &'b EntitiesRes,
markers: &'b mut WriteStorage<'a, M>,
allocator: &'b mut M::Allocator,
deserializer: D
) -> Result<(), D::Error> where
D: Deserializer<'de>,
Deserialize entities according to markers.