pub struct SliceCursor<'a> { /* private fields */ }Expand description
Cursor over a slice of Postings sorted by id.
Implementations§
Trait Implementations§
Source§impl<'a> Clone for SliceCursor<'a>
impl<'a> Clone for SliceCursor<'a>
Source§fn clone(&self) -> SliceCursor<'a>
fn clone(&self) -> SliceCursor<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for SliceCursor<'a>
impl<'a> Debug for SliceCursor<'a>
Source§impl PostingCursor for SliceCursor<'_>
impl PostingCursor for SliceCursor<'_>
Source§fn peek(&self) -> Option<Posting>
fn peek(&self) -> Option<Posting>
The current element, or
None once the cursor is past the end.Source§fn seek(&mut self, target: RecordId) -> Option<Posting>
fn seek(&mut self, target: RecordId) -> Option<Posting>
Move forward to the first element whose id is
>= target and return
it. Returns None when no such element exists; the cursor is then
past the end. Never moves backwards.Source§fn last_id(&self) -> Option<RecordId>
fn last_id(&self) -> Option<RecordId>
Id of the last element of the whole list (regardless of position);
None for an empty list.Source§fn drain_through(&mut self, hi: RecordId, visit: impl FnMut(RecordId, Weight))
fn drain_through(&mut self, hi: RecordId, visit: impl FnMut(RecordId, Weight))
Consume every element with id
<= hi, handing each (id, weight) to
visit in id order. Leaves the cursor on the first element above
hi (or past the end).Source§fn upper_bound(&self) -> Weight
fn upper_bound(&self) -> Weight
An upper bound on the weights of the elements not yet consumed, the
current one included.
f32::NEG_INFINITY once past the end.Source§fn lower_bound(&self) -> Weight
fn lower_bound(&self) -> Weight
A lower bound on the weights of the elements not yet consumed. The
default is unbounded, which is always correct; storages that track a
suffix minimum can tighten it so negative query weights prune too.
Source§fn is_exhausted(&self) -> bool
fn is_exhausted(&self) -> bool
True once the cursor is past the end.
Auto Trait Implementations§
impl<'a> Freeze for SliceCursor<'a>
impl<'a> RefUnwindSafe for SliceCursor<'a>
impl<'a> Send for SliceCursor<'a>
impl<'a> Sync for SliceCursor<'a>
impl<'a> Unpin for SliceCursor<'a>
impl<'a> UnsafeUnpin for SliceCursor<'a>
impl<'a> UnwindSafe for SliceCursor<'a>
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