the problem with using tauri Rust Commands #2495
-
Hi everyone. I encountered a problem when using ‘Rust Commands’. My rust code is as follows: async fn get_post_as_string2(url: String) -> Result<String, Box> { async fn some_other_function(invoke_message: String) -> Option { #[tauri::command] But when calling, the following error is returned: How to solve the problems? Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 6 replies
-
Hey. This error most likely stems from your specific rust code (in your |
Beta Was this translation helpful? Give feedback.
-
My rust code is as follows, I am in the process of learning, so the rust code may be messy: async fn get_post_as_string2(url: String) -> Result<String, Box> { async fn some_other_function(invoke_message: String) -> Option { #[tauri::command] |
Beta Was this translation helpful? Give feedback.
-
@FabianLars According to your guidance, my code can run normally, thank you very much. |
Beta Was this translation helpful? Give feedback.
@FabianLars According to your guidance, my code can run normally, thank you very much.
FabianLarstokio = { version = "1.10", features = ["full"] }
reqwest = { version = "0.11", features = ["json"] }