Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider World::send returning back Event #61

Open
andrewgazelka opened this issue May 9, 2024 · 1 comment
Open

Consider World::send returning back Event #61

andrewgazelka opened this issue May 9, 2024 · 1 comment

Comments

@andrewgazelka
Copy link
Contributor

andrewgazelka commented May 9, 2024

pub fn send<E: Event>(&mut self, event: E) {

should perhaps be something like

pub fn send<E: Event>(&mut self, event: E) -> Option<E>

Or perhaps have a generic output on whether the event is immutable or not. This can be useful when sending an event from a World and wanting a response.


Do you think this is a good idea? Perhaps there is a more idiomatic way to do this, but I can't think of one that doesn't sacrifice in certain areas right now.

@Norbiros
Copy link

Norbiros commented Sep 2, 2024

I really like this idea! It opens so many new possibilities.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants