xxxxxxxxxx
In easy words, String is datatype stored on heap (just like Vec),
and you have access to that location.
&str is a slice type. That means it is just reference to an already
present String somewhere in the heap.
&str doesn't do any allocation at runtime. So, for memory reasons,
you can use &str over String. But, keep in mind that when using
&str you might have to deal with explicit lifetimes.