pub trait VisitEntities {
// Required method
fn visit_entities<F: FnMut(Entity)>(&self, f: F);
}
Expand description
Apply an operation to all entities in a container.
This is implemented by default for types that implement IntoIterator
.
It may be useful to implement directly for types that can’t produce an iterator for lifetime reasons, such as those involving internal mutexes.
Required Methods§
sourcefn visit_entities<F: FnMut(Entity)>(&self, f: F)
fn visit_entities<F: FnMut(Entity)>(&self, f: F)
Apply an operation to all contained entities.
Object Safety§
This trait is not object safe.