I don’t know what has happened, maybe I’ve internalized the “buffer” notion of Vec and String. Anyway. From teaching standing point I prefer to tell about Vectors and Strings first and ownership first.
As a purely hypothetical exercise I think the best terms would be something that uses an unmodified noun for the owned type and a “view” name for the view. It makes the connotation of string slices more clear — it’s a view type, it’s got a relation with some owned data somewhere. For consistency reasons, one might prefer either “slice” or “view” in the names here.
| Owned type |
shared view type |
| Vector<T> |
&Slice<T> |
| String |
&StringView |
| Path |
&PathView |
| OsString |
&OsStringView |
Edit: edited view names from snake case to camel case. 