A Better Way to Borrow in Rust: Stack Tokens
As a Rust programmer you are probably quite familiar with how references work in Rust. If you have a value of type T you can generally get various references to it by using the ampersand (&) operator on it. In the most trivial case &T gives you just that: a reference to T. There are however cases where you can get something else. For instance String implements
Deref<Target=&str>
which lets you also get a &str from it and that system also can be extended to work with mutable references as well.
Source: A Better Way to Borrow in Rust: Stack Tokens, an article by Armin Ronacher.