Faster, more compact implementation of std::borrow::Cow
Beef
trait has been reworked and now has only two methods: owned_into_parts
, which takes the owned value and returns a NonNull
fat pointer and capacity, and owned_from_parts
which takes a NonNull
fat pointer and capacity and reconstructs the owned value.&mut [T] as *mut [T]
by constructing the fat pointer from parts internally.no_std
support (#5).const_fn
feature that makes Cow::borrow
a const fn
, usable on nightly only (#3).&T
to NonNull<T>
internally to avoid soundness issues.beef::Cow
and std::borrow::Cow
can now be converted to one another using the From
and Into
traits.