Function alloc::collections::btree::mem::take_mut

source ·
pub fn take_mut<T>(v: &mut T, change: impl FnOnce(T) -> T)
Expand description

This replaces the value behind the v unique reference by calling the relevant function.

If a panic occurs in the change closure, the entire process will be aborted.