pub trait TargetedEvent: Event<EventIdx = TargetedEventIdx> { }Expand description
An event which is directed at a particular entity.
This trait is automatically implemented for all types which implement
Event<EventIdx = TargetedEventIdx>. Use the derive macro to create the
appropriate implementation of Event.
Note that this trait is intended to be mutually exclusive with
GlobalEvent.
§Deriving
use evenio::prelude::*;
#[derive(TargetedEvent)]
struct MyEvent {
example_data: i32,
}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.