Skip to content

Provide entities_iter() on EntityMapper to get an iterator of foreign entities #13703

@aristaeus

Description

@aristaeus

What problem does this solve or what need does it fill?

I want to get a list of all the entities that an EntityMapper is tracking. If we have a concrete hash map this is easy, but in generic code we have to work with the trait.

What solution would you like?

Add a new function to EntityMapper (returning Vec rather than impl Iterator for trait object reasons)

fn entities(&self) -> Vec<(Entity, Entity)>;

What alternative(s) have you considered?

Add a separate trait with this function. This would reduce breakage by not requiring the ecosystem to immediately implement a new function.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-FeatureA new feature, making something new possibleS-Needs-TriageThis issue needs to be labelled

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions