mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-04-03 10:11:15 +02:00
1.4 KiB
1.4 KiB
tauri
| tauri |
|---|
| patch |
Simplify usage of app event and window label types. The following functions now
accept references the Tag can be borrowed as. This means an &str can now be
accepted for functions like Window::emit. This is a breaking change for the
following items, which now need to take a reference. Additionally, type inference
for &"event".into() will no longer work, but &"event".to_string() will. The
solution for this is to now just pass "event" because Borrow<str> is implemented
for the default event type String.
- Breaking:
Window::emitnow acceptsBorrowfor the event. - Breaking:
Window::emit_othersnow acceptsBorrowfor the event - Breaking:
Window::triggernow acceptsBorrowfor the event. - Breaking:
Manager::emit_allnow acceptsBorrowfor the event. - Breaking:
Manager::emit_tonow acceptsBorrowfor both the event and window label. - Breaking:
Manager::trigger_globalnow acceptsBorrowfor the event. - Breaking:
Manager::get_windownow acceptsBorrowfor the window label. - (internal):
trait tauri::runtime::tag::TagRefhelper for accepting tag references. Any time you want to accept a tag reference, that trait will handle requiring the reference to have all the necessary bounds, and generate errors when the exposed function doesn't set a bound likeP::Event: Borrow<E>.