How do I safely share this response.audio_file
to a different thread?
thread::spawn(move || {
prepare_result_files(&response.audio_file);
});
//prepare_result_files(&response.audio_file).await;
Ok(response) // Doesn't work because
I tried to implement Copy trait to AudioFile, but then I canot because mosf of the types cannot implement Copy trait:
#[derive(Serialize, Deserialize, Debug)]
#[tsync]
pub struct AudioFile {
pub id: i32,
pub name: String,
pub status: Status,
pub results: Option<Vec<ResultFile>>,
}
Any pointers?
3