rust-lang / wg-allocators

Home of the Allocators working group: Paving a path for a standard set of allocator traits to be used in collections!
http://bit.ly/hello-wg-allocators
209 stars 9 forks source link

Hide Cow implementation details #67

Closed pickfire closed 4 years ago

pickfire commented 4 years ago

Cow is implemented with implementation details, can we add additional layers on top of it to allows other Cow ripoffs such as https://github.com/maciejhirsz/beef to easily become a Cow drop-in replacement without changing anything?

Currently, Cow is accessed through the fields directly, we could add additional methods to access those fields and soft deprecate the existing direct access to the enum fields. Any thoughts on this?

TimDiekmann commented 4 years ago

I think this should go to rust-lang/rust, as this workgroup's main issue is the allocator-api feature.