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

#[tauri::command]
pub fn simple_command()->String{
“String”.to_string()
}

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 R…


This content originally appeared on DEV Community and was authored by ke na

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

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.


This content originally appeared on DEV Community and was authored by ke na


Print Share Comment Cite Upload Translate Updates
APA

ke na | Sciencx (2024-07-25T21:58:04+00:00) [Rust]How to make string handing to frontend on tauri app. Retrieved from https://www.scien.cx/2024/07/25/rusthow-to-make-string-handing-to-frontend-on-tauri-app/

MLA
" » [Rust]How to make string handing to frontend on tauri app." ke na | Sciencx - Thursday July 25, 2024, https://www.scien.cx/2024/07/25/rusthow-to-make-string-handing-to-frontend-on-tauri-app/
HARVARD
ke na | Sciencx Thursday July 25, 2024 » [Rust]How to make string handing to frontend on tauri app., viewed ,<https://www.scien.cx/2024/07/25/rusthow-to-make-string-handing-to-frontend-on-tauri-app/>
VANCOUVER
ke na | Sciencx - » [Rust]How to make string handing to frontend on tauri app. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2024/07/25/rusthow-to-make-string-handing-to-frontend-on-tauri-app/
CHICAGO
" » [Rust]How to make string handing to frontend on tauri app." ke na | Sciencx - Accessed . https://www.scien.cx/2024/07/25/rusthow-to-make-string-handing-to-frontend-on-tauri-app/
IEEE
" » [Rust]How to make string handing to frontend on tauri app." ke na | Sciencx [Online]. Available: https://www.scien.cx/2024/07/25/rusthow-to-make-string-handing-to-frontend-on-tauri-app/. [Accessed: ]
rf:citation
» [Rust]How to make string handing to frontend on tauri app | ke na | Sciencx | https://www.scien.cx/2024/07/25/rusthow-to-make-string-handing-to-frontend-on-tauri-app/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.