rj00a / evenio

An event-driven Entity Component System
MIT License
132 stars 14 forks source link

Parameterize `World` with a lifetime #43

Open rj00a opened 5 months ago

rj00a commented 5 months ago

It would be useful if World had a lifetime for the data contained within.

struct World<'w> {
    ...
}

We could then replace the 'static requirements for handlers and components with 'w. This would allow handlers and components to safely borrow data from outside the World.