So you've written a function that takes a large input String. Most of the time, you only need to read from this string—but occasionally, you'll need to modify it or extract an owned version. Cloning the string every time would be wasteful, but managing both owned and borrowed types separately can quickly get messy.

That's where Rust's smart...