pub fn with_mut<F, T>(this: &mut Self, f: F) -> T
    where
        F: FnOnce(&mut P) -> T,
    {
        // SAFETY: guard is required to write potentially changed pointer value, even on unwind
        let mut this = unsafe {
            scopeguard::guard(P::unerase(this.ptr), |unerased| {
                ptr::write(this, Thin::from(unerased))
            })
        };
        f(&mut this)
    }
/// Run a closure with a mutable borrow of the real pointer.
Run a closure with a mutable borrow of the real pointer.
Run a closure with a mutable borrow of the real pointer .
pub fn with_mut<F, T>(this: &mut Self, f: F) -> T
    where
        F: FnOnce(&mut P) -> T,
    {
        // SAFETY: guard is required to write potentially changed pointer value, even on unwind
        let mut this = unsafe {
            scopeguard::guard(P::unerase(this.ptr), |unerased| {
                ptr::write(this, Thin::from(unerased))
            })
        };
        f(&mut this)
    }
pub fn with_mut < F , T > ( this : & mut Self , f : F ) -> T where F : FnOnce ( & mut P ) -> T , { // SAFETY: guard is required to write potentially changed pointer value, even on unwind let mut this = unsafe { scopeguard :: guard ( P :: unerase ( this . ptr ) , | unerased | { ptr :: write ( this , Thin :: from ( unerased ) ) } ) } ; f ( & mut this ) }
Run a closure with a mutable borrow of the real pointer.
Run a closure with a mutable borrow of the real pointer .
this
&mut Self
f
F