pub(crate) fn slotmap_try_insert<K: Key, V, E, RD>(
slotmap: &mut SlotMap<K, V>,
value_maker: impl FnOnce(Count<K>) -> Result<(V, RD), E>,
) -> Result<(Ref<K>, RD), E>Expand description
Insert a new entry into a slotmap using refcounted keys, fallibly and with extra data
Like slotmap_insert but:
value_makercan also return extra return dataRDto the callervalue_makeris allowed to fail.
On successful return, the entry will be in the map, and
the new Ref is returned along with the data D.