I actually have one additional question; I used the following to print the individual elements of "msg":
let t = &msg.topic.as_str();
let s = String::from_utf8_lossy(&msg.payload);
println!("Topic = {}", t);
println!("Received payload: {}", s);
How can I use t and s outside of the closure?