pub struct Cursor {
pub mode: Mode,
pub pattern: String,
pub opts: SearchOptions,
pub page_size: usize,
pub last_path: Option<String>,
pub last_lineno: u64,
pub prev_total: usize,
pub fingerprint: u32,
pub root_hint: Option<String>,
}Expand description
Everything needed to reproduce a query and resume where the previous page ended.
Fields§
§mode: Mode§pattern: String§opts: SearchOptions§page_size: usize§last_path: Option<String>Keyset position: resume after this (path, lineno) (lineno is 0 in files/count modes).
last_lineno: u64§prev_total: usizetotal_matches when the cursor was minted, so a resume can report “N -> M matches”.
fingerprint: u32Low 32 bits of the result-set fingerprint when minted, for (advisory) staleness detection.
root_hint: Option<String>The positional path the query was scoped to, relative to the cwd (None = the cwd itself). The caller pages from the same directory, so a short relative scope re-resolves the same tree.
Trait Implementations§
impl Eq for Cursor
impl StructuralPartialEq for Cursor
Auto Trait Implementations§
impl Freeze for Cursor
impl RefUnwindSafe for Cursor
impl Send for Cursor
impl Sync for Cursor
impl Unpin for Cursor
impl UnsafeUnpin for Cursor
impl UnwindSafe for Cursor
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more