pub fn recurse<F, R>(&mut self, f: F) -> Result<R>
    where
        F: FnOnce(&mut Decoder<'_>) -> Result<R>,
    {
        if self.remaining_depth == 0 {
            return Err(Error::MaxRecursionDepth);
        }

        self.remaining_depth -= 1;
        let res = f(self)?;
        self.remaining_depth += 1;
        Ok(res)
    }
/// Runs the provided closure at at the next recursion depth level,
/// erroring if the maximum recursion limit has been reached.
Runs the provided closure at at the next recursion depth level,
erroring if the maximum recursion limit has been reached.
Runs the provided closure at at the next recursion depth level erroring if the maximum recursion limit has been reached .
pub fn recurse<F, R>(&mut self, f: F) -> Result<R>
    where
        F: FnOnce(&mut Decoder<'_>) -> Result<R>,
    {
        if self.remaining_depth == 0 {
            return Err(Error::MaxRecursionDepth);
        }
        self.remaining_depth -= 1;
        let res = f(self)?;
        self.remaining_depth += 1;
        Ok(res)
    }
pub fn recurse < F , R > ( & mut self , f : F ) -> Result < R > where F : FnOnce ( & mut Decoder < ' _ > ) -> Result < R > , { if self . remaining_depth == 0 { return Err ( Error :: MaxRecursionDepth ) ; } self . remaining_depth -= 1 ; let res = f ( self ) ? ; self . remaining_depth += 1 ; Ok ( res ) }
Runs the provided closure at at the next recursion depth level,
erroring if the maximum recursion limit has been reached.
Runs the provided closure at at the next recursion depth level erroring if the maximum recursion limit has been reached .
&mut self
f
F