pub fn replace_with<F: FnOnce(&mut T) -> T>(&self, f: F) -> T {
        let mut_borrow = &mut *self.borrow_mut();
        let replacement = f(mut_borrow);
        std::mem::replace(mut_borrow, replacement)
    }
/// Replaces the wrapped value with a new one computed from `f`, returning the old value.
///
/// # Panics
///
/// Panics if the value is currently borrowed.
Replaces the wrapped value with a new one computed from `f`, returning the old value.
Replaces the wrapped value with a new one computed from ` f ` returning the old value .
pub fn replace_with<F: FnOnce(&mut T) -> T>(&self, f: F) -> T {
        let mut_borrow = &mut *self.borrow_mut();
        let replacement = f(mut_borrow);
        std::mem::replace(mut_borrow, replacement)
    }
pub fn replace_with < F : FnOnce ( & mut T ) -> T > ( & self , f : F ) -> T { let mut_borrow = & mut * self . borrow_mut ( ) ; let replacement = f ( mut_borrow ) ; std :: mem :: replace ( mut_borrow , replacement ) }
Replaces the wrapped value with a new one computed from `f`, returning the old value.
Replaces the wrapped value with a new one computed from ` f ` returning the old value .
&self
f
F
&self
f
F
panics
Panics if the value is currently borrowed.
Panics if the value is currently borrowed .