pub trait EntityEvent: Event + Clone {
    // Required method
    fn target(&self) -> Entity;

    // Provided method
    fn can_bubble(&self) -> bool { ... }
}
Expand description

An event that targets a specific entity, and should support event listeners and bubbling.

Required Methods§

source

fn target(&self) -> Entity

The entity that was targeted by this event, e.g. the entity that was clicked on.

Provided Methods§

source

fn can_bubble(&self) -> bool

Should events of this type bubble up the entity hierarchy, starting from the target? This is enabled by default.

Object Safety§

This trait is not object safe.

Implementors§