pub struct GrepRequest {
pub pattern: String,
pub case_insensitive: bool,
pub path_prefix: Option<AbsolutePath>,
pub cursor: Option<String>,
pub limit: Option<u32>,
pub allow_stale: bool,
pub allow_scan: bool,
}Expand description
One content-search request.
Fields§
§pattern: StringThe pattern, in the Rust regex crate’s dialect (no backreferences
or lookaround). Patterns that require no literal bytes are rejected
with query_unindexable unless allow_scan is set.
case_insensitive: boolMatch case-insensitively. Verification is exact; the index remains consulted through its case-folded grams.
path_prefix: Option<AbsolutePath>Restrict matches to files under this complete absolute path, resolved to a directory inode before candidates are filtered.
cursor: Option<String>Resume cursor from a previous page. The cursor resumes strictly after the last candidate the issuing page finished scanning and is bound to that page’s request; each page is evaluated against the namespace head at page time.
limit: Option<u32>Maximum matches per page.
allow_stale: boolWhen the unindexed tail exceeds the scan budget, return
indexed-only results (reported via tail_scanned: false) instead
of failing with index_lagging.
allow_scan: boolPermit a capped exhaustive scan when the pattern yields no required grams. Refused beyond the server’s scan budget.
Implementations§
Source§impl GrepRequest
impl GrepRequest
Sourcepub fn fingerprint(&self) -> u64
pub fn fingerprint(&self) -> u64
Fingerprint of the fields that select results, binding cursors to the request that issued them. Not a durable format: cursors are opaque and short-lived, so this may change between builds.
Trait Implementations§
Source§impl Clone for GrepRequest
impl Clone for GrepRequest
Source§fn clone(&self) -> GrepRequest
fn clone(&self) -> GrepRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more