-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
The event module is private despite being exposed in the public API #2733
Comments
try importing Event enum directly use tauri::Event; |
That's a different type. The type used for the listener is imported in |
I see, thanks for reporting it, we probably need to combine these two event types. |
It would be nice if the struct could either be combined (maybe adding the I will create a POC for this issue with a renamed variant in the meantime. But it may be a good idea to address this before #2060 is finished. I've read somewhere that v1.0.0 will be coming soon, so it may be good to include it there. |
@Chaostheorie yeah we definitely need to fix this before v1. I think we decided internally that |
@amrbashir That sounds awesome. I'm really looking forward to the new release. Sidenote: |
I will move the discussion to your PR |
Describe the bug
The event module is private, making it impossible to reference
Event
orEventHandler
.To Reproduce
tauri::event::{Event, EventHandler}
Expected behavior
The module is not private.
Platform and Versions (required):
Additional context
I would like to do this:
Unfortunately, there is no way for me to
use
the necessary type, so this is impossible.In addition, it is impossible to store the result of
listen_global
to beunlisten
ed later, since there's no way to referenceEventHandler
in a struct.I wonder if it's a Rust bug that the API is even allowed to do this. It's essentially exposing a private type in the public API, which you can't do normally.
The text was updated successfully, but these errors were encountered: