Skip to main content

IntoEntityObserver

Trait IntoEntityObserver 

Source
pub trait IntoEntityObserver<Marker>: Send + 'static {
    // Required method
    fn into_observer_for_entity(self, entity: Entity) -> Observer;
}
Expand description

Trait for types that can be converted into an entity-targeting Observer.

This trait enforces that the event type implements EntityEvent.

Required Methods§

Source

fn into_observer_for_entity(self, entity: Entity) -> Observer

Converts this type into an Observer that watches the given entity.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§