You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, trough the raw-api feature a lot of custom APIs can be built.
There is though no easy way to replicate what DashMap::_get and DashMap::_get_mut do internally since Ref::new and RefMut::new are pub(crate) only.
Is there any specific reason on why they are not pub?
What brought me to open this issue is that i would want an atomic key-swap operation that returns a mutable reference to the moved value, this operation is too specific to mainline but having a public RefMut::new would make it easy to build it using extension traits.
Leaked implementation details
This change should not expose too many implementation details since shards and shard lock guards are already exposed (using the raw-api feature).
Compatibility
Adding a function to an already existing struct is listed by the rust documentation as "Possibly-breaking change" (found here) but I doubt that anybody extended Ref/RefMut with a new method.
The text was updated successfully, but these errors were encountered:
Currently, trough the raw-api feature a lot of custom APIs can be built.
There is though no easy way to replicate what
DashMap::_get
andDashMap::_get_mut
do internally sinceRef::new
andRefMut::new
arepub(crate)
only.Is there any specific reason on why they are not
pub
?What brought me to open this issue is that i would want an atomic key-swap operation that returns a mutable reference to the moved value, this operation is too specific to mainline but having a public
RefMut::new
would make it easy to build it using extension traits.Leaked implementation details
This change should not expose too many implementation details since shards and shard lock guards are already exposed (using the raw-api feature).
Compatibility
Adding a function to an already existing struct is listed by the rust documentation as "Possibly-breaking change" (found here) but I doubt that anybody extended
Ref
/RefMut
with anew
method.The text was updated successfully, but these errors were encountered: