I am on chapter 19 of The Rust Programming Language when I saw this code
Box<dyn Fn() + Send + 'static>
What does it do and why is there the plus sign (+
) in there? I don't remember encountering this in a previous chapter.
How is Box::new(|| println!("hi"))
a Box<dyn Fn() + Send + 'static>
?