fn find_entity<'a>(
entity_args: &'a EntityArgs,
e_type: &'a EntityType,
epoch_info: &'a EpochInfo,
) -> Result<&'a Entity, EpochError>Expand description
Looks up an entity inside the given epoch_info according to the
supplied arguments.
The function returns a reference to the matching entity or an
EpochError::EntityNotFound if no entity matches.
§Arguments
entity_args- The arguments that identify the entity.e_type- The type of entity to look for.epoch_info- The epoch that contains all entities.
§Returns
Ok(&Entity)- The entity that matches the arguments.Err(EpochError::EntityNotFound)- No matching entity was found.