I am new to Rust. I have a question about accepting closure ownership by a function. My understanding is that there are two ways we may go about doing this. First, by using generics. Second, by using Box with dynamic dispatch. When looking at std::thread, I notice that thread::spawn uses generics. Does this mean that the compiler will emit a new thread::spawn code for every closure we pass to it, and thus we end up with many thread::spawn code? Why was the generic approach chosen over the dynamic dispatch one?