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.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.