title: What are the differences between Rust's `String` and `str`?
body: <p>Why does Rust have <code>String</code> and <code>str</code>? What are the differences between <code>String</code> and <code>str</code>? When does one use <code>String</code> instead of <code>str</code> and vice versa? Is one of them getting deprecated?</p>