use powershell_script::{Output, PsError};
extern crate powershell_script;
#[tauri::command]
fn get_keyboard_list() -> Result<Output, PsError> {
let create_shortcut = include_str!("script.ps1");
match powershell_script::run(create_shortcut) {
Ok(output) => {
output
}
Err(e) => {
e
}
}
}
Getting error: #[tauri::command] method cannot be called on &Result<Output, PsError>
due to unsatisfied trait bounds.
I’m using Tauri(Rust) + NextJs for desktop app development. script.ps1 is powershell file which just returns all keyboard layouts with Get-WinUserLanguageList