Closed
Description
NOTE: IntoCow
has been deprecated, but you can get the same conversion by using the Cow::Owned
constructor, like so: Cow::Owned(vec![1, 2, 3])
.
The IntoCow
trait is a custom conversion trait for working with Cow
; the custom nature is needed to deal with trait coherence issues.
Ultimately, the hope was that this trait could support ergonomic "ownership polymorphism" for things like the entry
API. That's not the case today due to coherence limitations, but may become possible with impl specialization or other changes to the trait system.
The API needs a full re-evaluation before stabilization.