Well to be fair, I would never advocate using exceptions.
Also I’m quite sure Box doesn’t. I’ve seen compiler errors when attempting to pass one via mpsc.
Also I’m quite sure Box doesn’t. I’ve seen compiler errors when attempting to pass one via mpsc.
If you're trying to send a value to another thread, Rust will only stop you if the author of some type somewhere inside it has opted out, and none of its containers ever opted back in (as Box does).
The error message does drill down and tell you the actual type causing the lack of Send impl.
The only time you have to manually impl Send is for custom container types that are built from raw primitives.