bevy_ecs::entity

Trait VisitEntities

Source
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§

Source

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.

Implementors§

Source§

impl VisitEntities for Entity

Source§

impl<T> VisitEntities for T
where for<'a> &'a T: IntoIterator<Item = &'a Entity>,