A dynamically sized type has a size that can vary between values, so Rust cannot determine its exact size at compile time. A string slice, written str, is one example: different text values occupy different amounts of memory. section 2.2
Because Rust must know the size of local variables, you normally use &str instead of str. The reference has a known size and points to the text elsewhere. String is different: it is sized and can own variable-length text. section 2.2
Comparing text sizes
The text "자우림" and "Adrian Fahrenheit Țepeș" have different byte lengths. std::mem::size_of_val can measure each value, while size_of::<String>() reports String's fixed representation size. Attempting let my_name: str = "My name" produces an error; changing the type to &str supplies the needed reference.

