pub trait EventReader<'a> {
    type SystemData: SystemData<'a>;
    type Event: Clone + Send + Sync + 'static;

    fn read(&mut self, _: Self::SystemData, _: &mut Vec<Self::Event>);

    fn read_from_world(&mut self, world: &'a World, events: &mut Vec<Self::Event>) { ... }
    fn setup(&mut self, res: &mut Resources) { ... }
}
Expand description

Read events generically

Required Associated Types

SystemData needed to read the event(s)

The event type produced by the reader

Required Methods

Read events from the linked SystemData and append to the given Vec

Provided Methods

Read events from World and append to the given Vec

Setup event reader

Implementors