pub struct ReverseRangeIter<'p> { /* private fields */ }Expand description
A descending range cursor. Unlike reversing a forward RangeIter, this
pins one leaf at a time and never materialises the range it is walking.
Implementations§
Source§impl ReverseRangeIter<'_>
impl ReverseRangeIter<'_>
Sourcepub fn peek_ref(&mut self) -> Result<Option<(&[u8], &[u8])>>
pub fn peek_ref(&mut self) -> Result<Option<(&[u8], &[u8])>>
The descending record the cursor is parked on, borrowed from the pinned
leaf, with no allocation. Paired with ReverseRangeIter::step this is
the PULL cursor the forward iterator already has: peek, use, step, peek.
A query executor cannot live inside for_each_ref’s callback – it has
to interleave the walk with a heap, a work meter and a cancellation
check – and until this existed, every descending order had to
materialise its whole range before it could rank it. Same leaf pin,
same tree-id and cycle checks, same overflow resolution as the
callback form.
Auto Trait Implementations§
impl<'p> !RefUnwindSafe for ReverseRangeIter<'p>
impl<'p> !Send for ReverseRangeIter<'p>
impl<'p> !Sync for ReverseRangeIter<'p>
impl<'p> !UnwindSafe for ReverseRangeIter<'p>
impl<'p> Freeze for ReverseRangeIter<'p>
impl<'p> Unpin for ReverseRangeIter<'p>
impl<'p> UnsafeUnpin for ReverseRangeIter<'p>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more