The error occurs because your type contains a non-Send field, such as Rc<T>, preventing it from being moved across threads. Add the Send trait bound to your struct or function to explicitly allow the type to be transferred between threads.
use std::sync::Arc;
struct MyData {
value: Arc<i32>, // Arc is Send, Rc is not
}
fn send_data(data: MyData) {
// This now compiles because MyData is Send
}
If you are using Rc<T>, replace it with Arc<T> to make the type Send.