pub trait EntityLoader {
// Required method
fn load_entities(
&mut self,
uids: &HashSet<EntityUid>,
) -> HashMap<EntityUid, Option<Entity>>;
}Available on crate feature
tpe only.Expand description
Entity loader trait for batched evaluation.
Loads entities on demand, returning None for missing entities.
The load_entities function must load all requested entities,
and must compute and include all ancestors of the requested entities.
Loading more entities than requested is allowed.
Required Methods§
Sourcefn load_entities(
&mut self,
uids: &HashSet<EntityUid>,
) -> HashMap<EntityUid, Option<Entity>>
fn load_entities( &mut self, uids: &HashSet<EntityUid>, ) -> HashMap<EntityUid, Option<Entity>>
Load all entities for the given set of entity UIDs.
Returns a map from EntityUid to Option<Entity>, where None indicates
the entity does not exist.