pub fn with_append<F, R>(&mut self, x: &mut T, f: F) -> R
        where
            F: FnOnce(&mut Self) -> R,
        {
            self.v.push(x.into());
            let res = panic::catch_unwind(panic::AssertUnwindSafe(|| f(self)));
            self.v.pop();
            res.unwrap_or_else(|x| panic::resume_unwind(x))
        }
/// Appends a reference to this stack for the duration of the function `f`. When `f`
/// returns, the reference will be popped off the stack.
Appends a reference to this stack for the duration of the function `f`. When `f`
returns, the reference will be popped off the stack.
Appends a reference to this stack for the duration of the function ` f ` . When ` f ` returns the reference will be popped off the stack .
pub fn with_append<F, R>(&mut self, x: &mut T, f: F) -> R
        where
            F: FnOnce(&mut Self) -> R,
        {
            self.v.push(x.into());
            let res = panic::catch_unwind(panic::AssertUnwindSafe(|| f(self)));
            self.v.pop();
            res.unwrap_or_else(|x| panic::resume_unwind(x))
        }
pub fn with_append < F , R > ( & mut self , x : & mut T , f : F ) -> R where F : FnOnce ( & mut Self ) -> R , { self . v . push ( x . into ( ) ) ; let res = panic :: catch_unwind ( panic :: AssertUnwindSafe ( | | f ( self ) ) ) ; self . v . pop ( ) ; res . unwrap_or_else ( | x | panic :: resume_unwind ( x ) ) }
Appends a reference to this stack for the duration of the function `f`.
Appends a reference to this stack for the duration of the function ` f ` .
&mut self
x
&mut T
f
F