[Rust]How to make string handing to frontend on tauri app

#[tauri::command]
pub fn simple_command()->String{ "String".to_string()
}
Enter fullscreen mode Exit fullscreen mode

If you want to return a string in a Tauri command,add to_string() to the end of the string just like this.
This allows you to pass any string to the frontend like React.


Discover more from Coursity

Subscribe to get the latest posts sent to your email.

Leave a Comment

Your email address will not be published. Required fields are marked *

Discover more from Coursity

Subscribe now to keep reading and get access to the full archive.

Continue reading

Scroll to Top
Gpu dedicated servers (tbd). Frequently asked questions.