What does “Box<Fn() + Send + 'static>” mean in rust?
问题 What does Box<Fn() + Send + 'static> mean in rust? I stumbled upon this syntax while reading advanced types chapter. Send is a trait but what does it mean to + a lifetime to a trait ( 'static in this case) in type parametrization ? Also what is Fn() ? 回答1: Let's decompose it one-by-one. Box Box<T> is a pointer to heap-allocated T . We use it here because trait objects can only exist behind pointers. Trait objects In Box<Fn() + Send + 'static> , Fn() + Send + 'static is a trait object type. In