pub async fn rebind_entry<K, V, Out, Fut, E>(
map: &mut BTreeMap<K, V>,
key: &K,
op: impl FnOnce(V) -> Fut,
) -> Result<Out::Rest, E>Expand description
Threads the value at key in map through a consuming mutation, restoring the
returned value and yielding the mutation’s extra outputs.
On error the entry stays absent, matching the contract of consuming mutators: the handle is destroyed.
§Panics
Panics when key is absent from map.