It's not causing me any difficulties — I am perfectly capable of using String
— but is there any reason that str
is encapsulated in its own special type rather than inside the more general Box
type? If there is a reason then the answer might help me model how to work with Box
differently.
Why is str
encapsulated inside String
instead of inside a Box<str>
? Is it simply for convenience of typing such a common structure or is there a deeper reason?