How to open "dialog with message" from Rust? #9642
-
I want to show error message from Rust to explain problem to user. Now im using panic, but it just crashes app, as expected i think. I dont understand Tauri API docs. Moreover, it seems that Tauri API shows JavaScript frontend code. Can someone show example of code which function and how to call from Rust? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
The rust documentation is on docs.rs: https://docs.rs/tauri/latest/tauri/api/dialog/fn.message.html / https://docs.rs/tauri/latest/tauri/api/dialog/blocking/fn.message.html The docs are generally stil lacking but in this case i think there isn't that much to show. Here's an in-code example (for ask but message is almost the same) tauri/examples/api/src-tauri/src/main.rs Lines 224 to 236 in b02fc90 |
Beta Was this translation helpful? Give feedback.
The rust documentation is on docs.rs: https://docs.rs/tauri/latest/tauri/api/dialog/fn.message.html / https://docs.rs/tauri/latest/tauri/api/dialog/blocking/fn.message.html
The docs are generally stil lacking but in this case i think there isn't that much to show. Here's an in-code example (for ask but message is almost the same)
tauri/examples/api/src-tauri/src/main.rs
Lines 224 to 236 in b02fc90