馃挕 Merge Feature Updates
Updates
- Add support doc strings to
main.rs
- Refactor backend to use async request threads
#[tauri::command]
async fn get_data(address: String, endpoint: String) -> String {
let request_url = format!("http://{}/{}", address, endpoint);
let handle = thread::spawn(move || {
let r = match query(request_url) {
// If function returned OK...
Ok(result) => result, // Otherwise...
Err(_) => "0.0".into(),
};
return r;
});
let res = handle.join().unwrap();
return res;
}
- Update rust toolchain to
nightly
rust-version = "1.74"