I have a Rust struct T<'a> with Cow<'a, X> fields. I want to create .to_owned version of the struct and embed in another struct with a different lifetime. Lifetime of new struct could be shorter or longer. How do I do that?
Replying to @indygreg
"inherent impl" is the term for that. When you do `http://foo.bar ()` it first looks for an inherent method, then it looks for traits. Inherent method wins if both have a method with that name (UFCS required if two traits have the same method name)
11:20 AM - 1 May 2020
0 replies
0 retweets
2 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.