#Custom `Deserializer` for `tauri::command` arguments

2 messages · Page 1 of 1 (latest)

quick nexus
#

In v2, is it possible to specify a custom Deserializer for #[tauri::command] arguments?

e.g.
std::ffi::OsString does not implement Deserialize from wasm32 targets, so a custom Serializer /
Deserializer pair must be used if using a Rust-based frontend like Leptos or Yew.

#[tauri::command]
fn my_cmd(file_name: std::ffi::OsString) {
  // ...
}
crisp bear
#

hmm, no. you'd need a slim wrapper around the OsString :/