Working with strings in Rust

Rules of thumb for choosing between String and &str in Rust, with practical examples.