Add new reserved lifetime: 'owned
Rust Internals [Unofficial]
April 4, 2026
True, but Cow is runtime solution. Each time you want to touch field in structure that is Cow you have to check whatever it is borrowed or owned. In my case I want to have functions that are generated once for specific case: one for some reference type like string slice and then another one for owned String. This way we don`t have branching or some vtable dispatch on each value access.
Discussion in the ATmosphere