pub fn read_out_of_line<F, R>(&mut self, len: usize, f: F) -> Result<R>
    where
        F: FnOnce(&mut Decoder<'_>) -> Result<R>,
    {
        let (old_buf, old_initial_buf_len) = self.before_read_out_of_line(len)?;
        let res = f(self);

        // Set the current `buf` back to its original position.
        //
        // After this transformation, the final `Decoder` looks like this:
        // [---------------------------------]
        //     ^---buf--^               ^ool^ (slices)
        //                              ^out-of-line-advanced (index)
        self.buf = old_buf;
        self.initial_buf_len = old_initial_buf_len;
        res
    }
/// Runs the provided closure inside an decoder modified
/// to read out-of-line data.
///
/// `absolute_offset` indicates the offset of the start of the out-of-line data to read,
/// relative to the original start of the buffer.
Runs the provided closure inside an decoder modified
to read out-of-line data.

`absolute_offset` indicates the offset of the start of the out-of-line data to read,
relative to the original start of the buffer.
Runs the provided closure inside an decoder modified to read out - of - line data . ` absolute_offset ` indicates the offset of the start of the out - of - line data to read relative to the original start of the buffer .
pub fn read_out_of_line<F, R>(&mut self, len: usize, f: F) -> Result<R>
    where
        F: FnOnce(&mut Decoder<'_>) -> Result<R>,
    {
        let (old_buf, old_initial_buf_len) = self.before_read_out_of_line(len)?;
        let res = f(self);
        // Set the current `buf` back to its original position.
        //
        // After this transformation, the final `Decoder` looks like this:
        // [---------------------------------]
        //     ^---buf--^               ^ool^ (slices)
        //                              ^out-of-line-advanced (index)
        self.buf = old_buf;
        self.initial_buf_len = old_initial_buf_len;
        res
    }
pub fn read_out_of_line < F , R > ( & mut self , len : usize , f : F ) -> Result < R > where F : FnOnce ( & mut Decoder < ' _ > ) -> Result < R > , { let ( old_buf , old_initial_buf_len ) = self . before_read_out_of_line ( len ) ? ; let res = f ( self ) ; // Set the current `buf` back to its original position. // // After this transformation, the final `Decoder` looks like this: // [---------------------------------] //     ^---buf--^               ^ool^ (slices) //                              ^out-of-line-advanced (index) self . buf = old_buf ; self . initial_buf_len = old_initial_buf_len ; res }
Runs the provided closure inside an decoder modified
to read out-of-line data.
Runs the provided closure inside an decoder modified to read out - of - line data .
&mut self
len
usize
f
F