pub(super) fn diff_range_with_new<'a, 'b: 'a>(
        &'b self,
        new: &Self,
        range: &RangeInclusive<isize>,
    ) -> Option<DiffPageRangeIterator<'a>> {
        if self == new {
            return None;
        }

        let (start, end) = if self > new {
            (
                new.try_move_pages(Forwards, range.end().unsigned_abs() + 1)?,
                self.move_clamped(Forwards, range.end().unsigned_abs()),
            )
        } else {
            (
                self.move_clamped(Backwards, range.start().unsigned_abs()),
                new.try_move_pages(Backwards, range.start().unsigned_abs() + 1)?,
            )
        };

        assert!(start <= end);

        let next = Some(start);
        Some(DiffPageRangeIterator {
            end,
            next,
            _archives_ref: self.archives.borrow(),
        })
    }
// returns an iterator over the difference in the two ranges centered on self and other.
returns an iterator over the difference in the two ranges centered on self and other.
returns an iterator over the difference in the two ranges centered on self and other .
pub(super) fn diff_range_with_new<'a, 'b: 'a>(
        &'b self,
        new: &Self,
        range: &RangeInclusive<isize>,
    ) -> Option<DiffPageRangeIterator<'a>> {
        if self == new {
            return None;
        }
        let (start, end) = if self > new {
            (
                new.try_move_pages(Forwards, range.end().unsigned_abs() + 1)?,
                self.move_clamped(Forwards, range.end().unsigned_abs()),
            )
        } else {
            (
                self.move_clamped(Backwards, range.start().unsigned_abs()),
                new.try_move_pages(Backwards, range.start().unsigned_abs() + 1)?,
            )
        };
        assert!(start <= end);
        let next = Some(start);
        Some(DiffPageRangeIterator {
            end,
            next,
            _archives_ref: self.archives.borrow(),
        })
    }
pub ( super ) fn diff_range_with_new < ' a , ' b : ' a > ( & ' b self , new : & Self , range : & RangeInclusive < isize > , ) -> Option < DiffPageRangeIterator < ' a > > { if self == new { return None ; } let ( start , end ) = if self > new { ( new . try_move_pages ( Forwards , range . end ( ) . unsigned_abs ( ) + 1 ) ? , self . move_clamped ( Forwards , range . end ( ) . unsigned_abs ( ) ) , ) } else { ( self . move_clamped ( Backwards , range . start ( ) . unsigned_abs ( ) ) , new . try_move_pages ( Backwards , range . start ( ) . unsigned_abs ( ) + 1 ) ? , ) } ; assert ! ( start end ) ; let next = Some ( start ) ; Some ( DiffPageRangeIterator { end , next , _archives_ref : self . archives . borrow ( ) , } ) }
returns an iterator over the difference in the two ranges centered on self and other.
returns an iterator over the difference in the two ranges centered on self and other .
&'b self
new
&Self
range
&RangeInclusive<isize>
&'b self
new
&Self
range
&RangeInclusive<isize>